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

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

Issue 2881283002: add interface to start first run when voice interaction oobe is completed (Closed)
Patch Set: Created 3 years, 7 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 #include <vector> 10 #include <vector>
(...skipping 24 matching lines...) Expand all
35 35
36 // Receives intents from ARC. 36 // Receives intents from ARC.
37 class ArcIntentHelperBridge 37 class ArcIntentHelperBridge
38 : public ArcService, 38 : public ArcService,
39 public InstanceHolder<mojom::IntentHelperInstance>::Observer, 39 public InstanceHolder<mojom::IntentHelperInstance>::Observer,
40 public mojom::IntentHelperHost, 40 public mojom::IntentHelperHost,
41 public ash::LinkHandlerModelFactory { 41 public ash::LinkHandlerModelFactory {
42 public: 42 public:
43 ArcIntentHelperBridge( 43 ArcIntentHelperBridge(
44 ArcBridgeService* bridge_service, 44 ArcBridgeService* bridge_service,
45 const scoped_refptr<LocalActivityResolver>& activity_resolver); 45 const scoped_refptr<LocalActivityResolver>& activity_resolver,
46 const base::Callback<void()> first_run_function);
46 ~ArcIntentHelperBridge() override; 47 ~ArcIntentHelperBridge() override;
47 48
48 void AddObserver(ArcIntentHelperObserver* observer); 49 void AddObserver(ArcIntentHelperObserver* observer);
49 void RemoveObserver(ArcIntentHelperObserver* observer); 50 void RemoveObserver(ArcIntentHelperObserver* observer);
50 51
51 // InstanceHolder<mojom::IntentHelperInstance>::Observer 52 // InstanceHolder<mojom::IntentHelperInstance>::Observer
52 void OnInstanceReady() override; 53 void OnInstanceReady() override;
53 void OnInstanceClosed() override; 54 void OnInstanceClosed() override;
54 55
55 // mojom::IntentHelperHost 56 // mojom::IntentHelperHost
56 void OnIconInvalidated(const std::string& package_name) override; 57 void OnIconInvalidated(const std::string& package_name) override;
57 void OnIntentFiltersUpdated( 58 void OnIntentFiltersUpdated(
58 std::vector<IntentFilter> intent_filters) override; 59 std::vector<IntentFilter> intent_filters) override;
59 void OnOpenDownloads() override; 60 void OnOpenDownloads() override;
60 void OnOpenUrl(const std::string& url) override; 61 void OnOpenUrl(const std::string& url) override;
61 void OpenWallpaperPicker() override; 62 void OpenWallpaperPicker() override;
62 void SetWallpaperDeprecated(const std::vector<uint8_t>& jpeg_data) override; 63 void SetWallpaperDeprecated(const std::vector<uint8_t>& jpeg_data) override;
64 void OnVoiceInteractionOobeSetupCompleted() override;
63 65
64 // Retrieves icons for the |activities| and calls |callback|. 66 // Retrieves icons for the |activities| and calls |callback|.
65 // See ActivityIconLoader::GetActivityIcons() for more details. 67 // See ActivityIconLoader::GetActivityIcons() for more details.
66 using ActivityName = internal::ActivityIconLoader::ActivityName; 68 using ActivityName = internal::ActivityIconLoader::ActivityName;
67 // A part of OnIconsReadyCallback signature. 69 // A part of OnIconsReadyCallback signature.
68 using ActivityToIconsMap = internal::ActivityIconLoader::ActivityToIconsMap; 70 using ActivityToIconsMap = internal::ActivityIconLoader::ActivityToIconsMap;
69 using OnIconsReadyCallback = 71 using OnIconsReadyCallback =
70 internal::ActivityIconLoader::OnIconsReadyCallback; 72 internal::ActivityIconLoader::OnIconsReadyCallback;
71 using GetResult = internal::ActivityIconLoader::GetResult; 73 using GetResult = internal::ActivityIconLoader::GetResult;
72 GetResult GetActivityIcons(const std::vector<ActivityName>& activities, 74 GetResult GetActivityIcons(const std::vector<ActivityName>& activities,
(...skipping 17 matching lines...) Expand all
90 92
91 private: 93 private:
92 mojo::Binding<mojom::IntentHelperHost> binding_; 94 mojo::Binding<mojom::IntentHelperHost> binding_;
93 internal::ActivityIconLoader icon_loader_; 95 internal::ActivityIconLoader icon_loader_;
94 scoped_refptr<LocalActivityResolver> activity_resolver_; 96 scoped_refptr<LocalActivityResolver> activity_resolver_;
95 97
96 base::ThreadChecker thread_checker_; 98 base::ThreadChecker thread_checker_;
97 99
98 base::ObserverList<ArcIntentHelperObserver> observer_list_; 100 base::ObserverList<ArcIntentHelperObserver> observer_list_;
99 101
102 const base::Callback<void()> start_first_run_function_;
103
100 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); 104 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge);
101 }; 105 };
102 106
103 } // namespace arc 107 } // namespace arc
104 108
105 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ 109 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698