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

Side by Side Diff: components/arc/arc_service_manager.h

Issue 2168533002: Remove window_manager.mojom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « components/arc/arc_bridge_service_impl.cc ('k') | components/arc/arc_service_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ARC_SERVICE_MANAGER_H_ 5 #ifndef COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
6 #define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ 6 #define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 39
40 // Gets the global instance of the ARC Service Manager. This can only be 40 // Gets the global instance of the ARC Service Manager. This can only be
41 // called on the thread that this class was created on. 41 // called on the thread that this class was created on.
42 static ArcServiceManager* Get(); 42 static ArcServiceManager* Get();
43 43
44 // Called when the main profile is initialized after user logs in. 44 // Called when the main profile is initialized after user logs in.
45 void OnPrimaryUserProfilePrepared( 45 void OnPrimaryUserProfilePrepared(
46 const AccountId& account_id, 46 const AccountId& account_id,
47 std::unique_ptr<BooleanPrefMember> arc_enabled_pref); 47 std::unique_ptr<BooleanPrefMember> arc_enabled_pref);
48 48
49 // Called once the windowing system (ash) has been started.
50 void OnAshStarted();
51
52 // Called to shut down all ARC services. 49 // Called to shut down all ARC services.
53 void Shutdown(); 50 void Shutdown();
54 51
55 scoped_refptr<base::TaskRunner> blocking_task_runner() const { 52 scoped_refptr<base::TaskRunner> blocking_task_runner() const {
56 return blocking_task_runner_; 53 return blocking_task_runner_;
57 } 54 }
58 55
59 // Set ArcBridgeService instance for testing. Call before ArcServiceManager 56 // Set ArcBridgeService instance for testing. Call before ArcServiceManager
60 // creation. ArcServiceManager owns |arc_bridge_service|. 57 // creation. ArcServiceManager owns |arc_bridge_service|.
61 static void SetArcBridgeServiceForTesting( 58 static void SetArcBridgeServiceForTesting(
62 std::unique_ptr<ArcBridgeService> arc_bridge_service); 59 std::unique_ptr<ArcBridgeService> arc_bridge_service);
63 60
64 // Returns the icon loader owned by ArcServiceManager and shared by services. 61 // Returns the icon loader owned by ArcServiceManager and shared by services.
65 scoped_refptr<ActivityIconLoader> icon_loader() { return icon_loader_; } 62 scoped_refptr<ActivityIconLoader> icon_loader() { return icon_loader_; }
66 63
67 // Returns the activity resolver owned by ArcServiceManager. 64 // Returns the activity resolver owned by ArcServiceManager.
68 scoped_refptr<LocalActivityResolver> activity_resolver() { 65 scoped_refptr<LocalActivityResolver> activity_resolver() {
69 return activity_resolver_; 66 return activity_resolver_;
70 } 67 }
71 68
72 private: 69 private:
73 base::ThreadChecker thread_checker_; 70 base::ThreadChecker thread_checker_;
74 scoped_refptr<base::TaskRunner> blocking_task_runner_; 71 scoped_refptr<base::TaskRunner> blocking_task_runner_;
75 72
76 std::unique_ptr<ArcBridgeService> arc_bridge_service_; 73 std::unique_ptr<ArcBridgeService> arc_bridge_service_;
77 std::vector<std::unique_ptr<ArcService>> services_; 74 std::vector<std::unique_ptr<ArcService>> services_;
78 scoped_refptr<ActivityIconLoader> icon_loader_; 75 scoped_refptr<ActivityIconLoader> icon_loader_;
79 scoped_refptr<LocalActivityResolver> activity_resolver_; 76 scoped_refptr<LocalActivityResolver> activity_resolver_;
80 77
81 // True once the window manager service got added, barring adding any more
82 // of those since OnAshStarted() might be called multiple times.
83 bool on_ash_started_called_ = false;
84
85 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); 78 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager);
86 }; 79 };
87 80
88 } // namespace arc 81 } // namespace arc
89 82
90 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ 83 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service_impl.cc ('k') | components/arc/arc_service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698