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

Side by Side Diff: chrome/browser/media/router/discovery/dial/dial_registry.h

Issue 2868263002: [Media Router] Add some SetForTest() functions to DialMediaSinkService and update unit tests (Closed)
Patch Set: resolve code review comments from Mark 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
« no previous file with comments | « chrome/browser/media/router/discovery/dial/dial_media_sink_service_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_REGISTRY_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_REGISTRY_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_REGISTRY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 protected: 56 protected:
57 virtual ~Observer() {} 57 virtual ~Observer() {}
58 }; 58 };
59 59
60 static DialRegistry* GetInstance(); 60 static DialRegistry* GetInstance();
61 61
62 // Called by the DIAL API when event listeners are added or removed. The dial 62 // Called by the DIAL API when event listeners are added or removed. The dial
63 // service is started after the first listener is added and stopped after the 63 // service is started after the first listener is added and stopped after the
64 // last listener is removed. 64 // last listener is removed.
65 void OnListenerAdded(); 65 virtual void OnListenerAdded();
66 void OnListenerRemoved(); 66 virtual void OnListenerRemoved();
67 67
68 // pass a reference of |observer| to allow it to notify on DIAL device events. 68 // pass a reference of |observer| to allow it to notify on DIAL device events.
69 // This class does not take ownership of observer. 69 // This class does not take ownership of observer.
70 virtual void RegisterObserver(Observer* observer); 70 virtual void RegisterObserver(Observer* observer);
71 virtual void UnregisterObserver(Observer* observer); 71 virtual void UnregisterObserver(Observer* observer);
72 72
73 // Called by the DIAL API to try to kickoff a discovery if there is not one 73 // Called by the DIAL API to try to kickoff a discovery if there is not one
74 // already active. 74 // already active.
75 bool DiscoverNow(); 75 bool DiscoverNow();
76 76
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 TestRemovingListenerDoesNotClearList); 206 TestRemovingListenerDoesNotClearList);
207 FRIEND_TEST_ALL_PREFIXES(DialRegistryTest, TestNetworkEventConnectionLost); 207 FRIEND_TEST_ALL_PREFIXES(DialRegistryTest, TestNetworkEventConnectionLost);
208 FRIEND_TEST_ALL_PREFIXES(DialRegistryTest, 208 FRIEND_TEST_ALL_PREFIXES(DialRegistryTest,
209 TestNetworkEventConnectionRestored); 209 TestNetworkEventConnectionRestored);
210 DISALLOW_COPY_AND_ASSIGN(DialRegistry); 210 DISALLOW_COPY_AND_ASSIGN(DialRegistry);
211 }; 211 };
212 212
213 } // namespace media_router 213 } // namespace media_router
214 214
215 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_REGISTRY_H_ 215 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_REGISTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/discovery/dial/dial_media_sink_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698