Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: components/arc/common/intent_helper.mojom

Issue 2078683002: Add handler and mojo interface to accept android intent filters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up version numbers after sync. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Next MinVersion: 8 5 // Next MinVersion: 9
6 module arc.mojom; 6 module arc.mojom;
7 7
8 import "scale_factor.mojom"; 8 import "scale_factor.mojom";
9 9
10 // Describes the type of action to invoke. 10 // Describes the type of action to invoke.
11 enum ActionType { 11 enum ActionType {
12 VIEW, 12 VIEW,
13 SEND, 13 SEND,
14 SEND_MULTIPLE, 14 SEND_MULTIPLE,
15 }; 15 };
16 16
17 enum PatternType {
Luis Héctor Chávez 2016/06/16 22:45:20 Is this expected to be fixed forever? Otherwise, a
zentaro 2016/06/17 21:42:25 Done.
18 PATTERN_LITERAL,
19 PATTERN_PREFIX,
20 PATTERN_SIMPLE_GLOB,
21 };
22
23 struct PatternMatcher {
24 string pattern;
25 PatternType type;
26 };
27
28 struct AuthorityEntry {
29 string host;
30 int32 port;
31 };
32
33 struct IntentFilter {
34 array<string> actions;
35 array<string> categories;
36 array<string> data_schemes;
37 array<AuthorityEntry> data_authorities;
38 array<PatternMatcher> data_paths;
39 array<PatternMatcher> data_scheme_specific_parts;
40 };
41
17 // Describes a package that can handle a URL. 42 // Describes a package that can handle a URL.
18 struct UrlHandlerInfo { 43 struct UrlHandlerInfo {
19 string name; 44 string name;
20 string package_name; 45 string package_name;
21 string activity_name; // A hint for retrieving the package's icon. 46 string activity_name; // A hint for retrieving the package's icon.
22 [MinVersion=4] ActionType action; 47 [MinVersion=4] ActionType action;
23 [MinVersion=6] bool is_preferred; 48 [MinVersion=6] bool is_preferred;
24 }; 49 };
25 50
26 // Describes an activity. 51 // Describes an activity.
(...skipping 10 matching lines...) Expand all
37 array<uint8> icon; // in BGRA8888 format 62 array<uint8> icon; // in BGRA8888 format
38 }; 63 };
39 64
40 // URL associated with its mime type. 65 // URL associated with its mime type.
41 struct UrlWithMimeType { 66 struct UrlWithMimeType {
42 string url; 67 string url;
43 string mime_type; 68 string mime_type;
44 }; 69 };
45 70
46 // Handles intents from ARC in Chrome. 71 // Handles intents from ARC in Chrome.
47 // Next method ID: 4 72 // Next method ID: 5
48 interface IntentHelperHost { 73 interface IntentHelperHost {
49 // Called when icons associated with the package are no longer up to date. 74 // Called when icons associated with the package are no longer up to date.
50 [MinVersion=3] OnIconInvalidated@1(string package_name); 75 [MinVersion=3] OnIconInvalidated@1(string package_name);
51 76
77 // Called when intent filters are updated. Either on startup or when
78 // apps are installed or uninstalled.
79 [MinVersion=8] OnIntentFiltersUpdated@4(array<IntentFilter> intent_filters);
80
52 // Opens the downloads directory in the Chrome OS file manager. 81 // Opens the downloads directory in the Chrome OS file manager.
53 [MinVersion=5] OnOpenDownloads@2(); 82 [MinVersion=5] OnOpenDownloads@2();
54 83
55 // Opens the url with Chrome for Chrome OS. 84 // Opens the url with Chrome for Chrome OS.
56 OnOpenUrl@0(string url); 85 OnOpenUrl@0(string url);
57 86
58 // Opens the wallpaper picker dialog. 87 // Opens the wallpaper picker dialog.
59 [MinVersion=6] OpenWallpaperPicker@3(); 88 [MinVersion=6] OpenWallpaperPicker@3();
60 }; 89 };
61 90
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // specified. Data can be sent as extras by including a JSON map string which 133 // specified. Data can be sent as extras by including a JSON map string which
105 // will be automatically converted to a bundle accessible by the receiver. 134 // will be automatically converted to a bundle accessible by the receiver.
106 // 135 //
107 // Note: Broadcasts can only be sent to whitelisted packages. Packages can be 136 // Note: Broadcasts can only be sent to whitelisted packages. Packages can be
108 // added to the whitelist in ArcBridgeService.java in the Android source. 137 // added to the whitelist in ArcBridgeService.java in the Android source.
109 [MinVersion=1] SendBroadcast@1(string action, 138 [MinVersion=1] SendBroadcast@1(string action,
110 string package_name, 139 string package_name,
111 string cls, 140 string cls,
112 string extras); 141 string extras);
113 }; 142 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698