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

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

Issue 2031143002: Add unit tests for ArcBridgeService::RemoveObserver() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | components/arc/arc_bridge_service_unittest.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_BRIDGE_SERVICE_H_ 5 #ifndef COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_
6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ 6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // HandleStartup() should be called upon profile startup. This will only 170 // HandleStartup() should be called upon profile startup. This will only
171 // launch an instance if the instance service is available and it is enabled. 171 // launch an instance if the instance service is available and it is enabled.
172 // This can only be called on the thread that this class was created on. 172 // This can only be called on the thread that this class was created on.
173 virtual void HandleStartup() = 0; 173 virtual void HandleStartup() = 0;
174 174
175 // Shutdown() should be called when the browser is shutting down. This can 175 // Shutdown() should be called when the browser is shutting down. This can
176 // only be called on the thread that this class was created on. 176 // only be called on the thread that this class was created on.
177 virtual void Shutdown() = 0; 177 virtual void Shutdown() = 0;
178 178
179 // Adds or removes observers. This can only be called on the thread that this 179 // Adds or removes observers. This can only be called on the thread that this
180 // class was created on. 180 // class was created on. RemoveObserver does nothing if |observer| is not in
181 // the list.
181 void AddObserver(Observer* observer); 182 void AddObserver(Observer* observer);
182 void RemoveObserver(Observer* observer); 183 void RemoveObserver(Observer* observer);
183 184
184 // Gets the Mojo interface for all the instance services. This will return 185 // Gets the Mojo interface for all the instance services. This will return
185 // nullptr if that particular service is not ready yet. Use an Observer if 186 // nullptr if that particular service is not ready yet. Use an Observer if
186 // you want to be notified when this is ready. This can only be called on the 187 // you want to be notified when this is ready. This can only be called on the
187 // thread that this class was created on. 188 // thread that this class was created on.
188 mojom::AppInstance* app_instance() { return app_ptr_.get(); } 189 mojom::AppInstance* app_instance() { return app_ptr_.get(); }
189 mojom::AudioInstance* audio_instance() { return audio_ptr_.get(); } 190 mojom::AudioInstance* audio_instance() { return audio_ptr_.get(); }
190 mojom::AuthInstance* auth_instance() { return auth_ptr_.get(); } 191 mojom::AuthInstance* auth_instance() { return auth_ptr_.get(); }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 410
410 // WeakPtrFactory to use callbacks. 411 // WeakPtrFactory to use callbacks.
411 base::WeakPtrFactory<ArcBridgeService> weak_factory_; 412 base::WeakPtrFactory<ArcBridgeService> weak_factory_;
412 413
413 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); 414 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService);
414 }; 415 };
415 416
416 } // namespace arc 417 } // namespace arc
417 418
418 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ 419 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | components/arc/arc_bridge_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698