summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/ui/webui/downloads/downloads.mojom
blob: 07926b97e6c8f4cc7fd350eef861c95dc87a04b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module downloads.mojom;

struct Data {
  bool file_externally_removed;
  bool otr;
  bool resume;
  bool retry;
  int32 percent;
  int32 started;
  int32 total;
  string by_ext_id;
  string by_ext_name;
  string danger_type;
  string date_string;
  string file_name;
  string file_path;
  string file_url;
  string id;
  string last_reason_text;
  string progress_status_text;
  string since_string;
  string state;
  string url;
};

interface PageHandlerFactory {
  CreatePageHandler(Page page, PageHandler& handler);
};

interface PageHandler {
  GetDownloads(array<string> search_terms);
  OpenFileRequiringGesture(string id);
  Drag(string id);
  SaveDangerousRequiringGesture(string id);
  DiscardDangerous(string id);
  RetryDownload(string id);
  Show(string id);
  Pause(string id);
  Resume(string id);
  Remove(string id);
  Undo();
  Cancel(string id);
  ClearAll();
  OpenDownloadsFolderRequiringGesture();
};

interface Page {
  RemoveItem(int32 index);
  UpdateItem(int32 index, Data data);
  InsertItems(int32 index, array<Data> items);
  ClearAll();
};