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

Side by Side Diff: components/arc/intent_helper/arc_intent_helper_bridge.h

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 #ifndef COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ 5 #ifndef COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
6 #define COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ 6 #define COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 22 matching lines...) Expand all
33 public ash::LinkHandlerModelFactory { 33 public ash::LinkHandlerModelFactory {
34 public: 34 public:
35 ArcIntentHelperBridge(ArcBridgeService* bridge_service, 35 ArcIntentHelperBridge(ArcBridgeService* bridge_service,
36 const scoped_refptr<ActivityIconLoader>& icon_loader); 36 const scoped_refptr<ActivityIconLoader>& icon_loader);
37 ~ArcIntentHelperBridge() override; 37 ~ArcIntentHelperBridge() override;
38 38
39 // ArcBridgeService::Observer 39 // ArcBridgeService::Observer
40 void OnIntentHelperInstanceReady() override; 40 void OnIntentHelperInstanceReady() override;
41 void OnIntentHelperInstanceClosed() override; 41 void OnIntentHelperInstanceClosed() override;
42 42
43 // arc::IntentHelperHost
44 void OnOpenDownloads() override;
Yusuke Sato 2016/06/16 23:42:18 Does this compile? Line 50 seems to have the same
zentaro 2016/06/17 21:42:25 I merged incorrectly before upload. Fixed now.
45 void OnIntentFiltersUpdated(
Yusuke Sato 2016/06/16 23:42:18 Move down to line 50?
zentaro 2016/06/17 21:42:25 As above.
46 mojo::Array<mojom::IntentFilterPtr> intent_filters) override;
47
43 // arc::mojom::IntentHelperHost 48 // arc::mojom::IntentHelperHost
44 void OnIconInvalidated(const mojo::String& package_name) override; 49 void OnIconInvalidated(const mojo::String& package_name) override;
45 void OnOpenDownloads() override; 50 void OnOpenDownloads() override;
46 void OnOpenUrl(const mojo::String& url) override; 51 void OnOpenUrl(const mojo::String& url) override;
47 void OpenWallpaperPicker() override; 52 void OpenWallpaperPicker() override;
48 53
49 // ash::LinkHandlerModelFactory 54 // ash::LinkHandlerModelFactory
50 std::unique_ptr<ash::LinkHandlerModel> CreateModel(const GURL& url) override; 55 std::unique_ptr<ash::LinkHandlerModel> CreateModel(const GURL& url) override;
51 56
52 // Returns false if |package_name| is for the intent_helper apk. 57 // Returns false if |package_name| is for the intent_helper apk.
53 static bool IsIntentHelperPackage(const std::string& package_name); 58 static bool IsIntentHelperPackage(const std::string& package_name);
54 59
55 // Filters out handlers that belong to the intent_helper apk and returns 60 // Filters out handlers that belong to the intent_helper apk and returns
56 // a new array. 61 // a new array.
57 static mojo::Array<mojom::UrlHandlerInfoPtr> FilterOutIntentHelper( 62 static mojo::Array<mojom::UrlHandlerInfoPtr> FilterOutIntentHelper(
58 mojo::Array<mojom::UrlHandlerInfoPtr> handlers); 63 mojo::Array<mojom::UrlHandlerInfoPtr> handlers);
59 64
60 private: 65 private:
61 mojo::Binding<mojom::IntentHelperHost> binding_; 66 mojo::Binding<mojom::IntentHelperHost> binding_;
62 scoped_refptr<ActivityIconLoader> icon_loader_; 67 scoped_refptr<ActivityIconLoader> icon_loader_;
63 68
64 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); 69 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge);
65 }; 70 };
66 71
67 } // namespace arc 72 } // namespace arc
68 73
69 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ 74 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698