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

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

Issue 2837363002: [Media Router] Use DialMediaSinkService in MediaRouterMojoImpl (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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
77 // Starts and stops periodic discovery. Periodic discovery is done when there 77 // Starts and stops periodic discovery. Periodic discovery is done when there
78 // are registered event listeners. 78 // are registered event listeners.
Kevin M 2017/05/03 21:07:27 Virtual for testing?
zhaobin 2017/05/04 23:52:36 Yes...
79 void StartPeriodicDiscovery(); 79 virtual void StartPeriodicDiscovery();
80 void StopPeriodicDiscovery(); 80 virtual void StopPeriodicDiscovery();
81 81
82 // Returns the URL of the device description for the device identified by 82 // Returns the URL of the device description for the device identified by
83 // |label|, or an empty GURL if no such device exists. 83 // |label|, or an empty GURL if no such device exists.
84 GURL GetDeviceDescriptionURL(const std::string& label) const; 84 GURL GetDeviceDescriptionURL(const std::string& label) const;
85 85
86 // Adds a device directly to the registry as if it was discovered. For tests 86 // Adds a device directly to the registry as if it was discovered. For tests
87 // only. Note that if discovery is actually started, this device will be 87 // only. Note that if discovery is actually started, this device will be
88 // removed by PruneExpiredDevices(). 88 // removed by PruneExpiredDevices().
89 void AddDeviceForTest(const DialDeviceData& device_data); 89 void AddDeviceForTest(const DialDeviceData& device_data);
90 90
(...skipping 115 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

Powered by Google App Engine
This is Rietveld 408576698