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

Side by Side Diff: chrome/browser/media/router/mock_media_router.h

Issue 2731043002: [Media Router] Add a presentation id to MediaRoute mapping in the MR (Closed)
Patch Set: Created 3 years, 9 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 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 CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void(const MediaRoute::Id& route_id)); 80 void(const MediaRoute::Id& route_id));
81 std::unique_ptr<PresentationConnectionStateSubscription> 81 std::unique_ptr<PresentationConnectionStateSubscription>
82 AddPresentationConnectionStateChangedCallback( 82 AddPresentationConnectionStateChangedCallback(
83 const MediaRoute::Id& route_id, 83 const MediaRoute::Id& route_id,
84 const content::PresentationConnectionStateChangedCallback& callback) 84 const content::PresentationConnectionStateChangedCallback& callback)
85 override { 85 override {
86 OnAddPresentationConnectionStateChangedCallbackInvoked(callback); 86 OnAddPresentationConnectionStateChangedCallbackInvoked(callback);
87 return connection_state_callbacks_.Add(callback); 87 return connection_state_callbacks_.Add(callback);
88 } 88 }
89 MOCK_CONST_METHOD0(GetCurrentRoutes, std::vector<MediaRoute>()); 89 MOCK_CONST_METHOD0(GetCurrentRoutes, std::vector<MediaRoute>());
90 MOCK_METHOD2(RegisterPresentationRoute,
91 void(const std::string& presentation_id,
92 const MediaRoute& route));
93 MOCK_METHOD1(UnregisterPresentationRoute,
94 void(const std::string& presentation_id));
95 MOCK_CONST_METHOD1(GetPresentationRoute,
96 const MediaRoute*(const std::string& presentation_id));
90 97
91 MOCK_METHOD0(OnIncognitoProfileShutdown, void()); 98 MOCK_METHOD0(OnIncognitoProfileShutdown, void());
92 MOCK_METHOD1(OnAddPresentationConnectionStateChangedCallbackInvoked, 99 MOCK_METHOD1(OnAddPresentationConnectionStateChangedCallbackInvoked,
93 void(const content::PresentationConnectionStateChangedCallback& 100 void(const content::PresentationConnectionStateChangedCallback&
94 callback)); 101 callback));
95 MOCK_METHOD1(RegisterIssuesObserver, void(IssuesObserver* observer)); 102 MOCK_METHOD1(RegisterIssuesObserver, void(IssuesObserver* observer));
96 MOCK_METHOD1(UnregisterIssuesObserver, void(IssuesObserver* observer)); 103 MOCK_METHOD1(UnregisterIssuesObserver, void(IssuesObserver* observer));
97 MOCK_METHOD1(RegisterMediaSinksObserver, bool(MediaSinksObserver* observer)); 104 MOCK_METHOD1(RegisterMediaSinksObserver, bool(MediaSinksObserver* observer));
98 MOCK_METHOD1(UnregisterMediaSinksObserver, 105 MOCK_METHOD1(UnregisterMediaSinksObserver,
99 void(MediaSinksObserver* observer)); 106 void(MediaSinksObserver* observer));
100 MOCK_METHOD1(RegisterMediaRoutesObserver, 107 MOCK_METHOD1(RegisterMediaRoutesObserver,
101 void(MediaRoutesObserver* observer)); 108 void(MediaRoutesObserver* observer));
102 MOCK_METHOD1(UnregisterMediaRoutesObserver, 109 MOCK_METHOD1(UnregisterMediaRoutesObserver,
103 void(MediaRoutesObserver* observer)); 110 void(MediaRoutesObserver* observer));
104 MOCK_METHOD1(RegisterRouteMessageObserver, 111 MOCK_METHOD1(RegisterRouteMessageObserver,
105 void(RouteMessageObserver* observer)); 112 void(RouteMessageObserver* observer));
106 MOCK_METHOD1(UnregisterRouteMessageObserver, 113 MOCK_METHOD1(UnregisterRouteMessageObserver,
107 void(RouteMessageObserver* observer)); 114 void(RouteMessageObserver* observer));
108 115
109 private: 116 private:
110 base::CallbackList<void( 117 base::CallbackList<void(
111 const content::PresentationConnectionStateChangeInfo&)> 118 const content::PresentationConnectionStateChangeInfo&)>
112 connection_state_callbacks_; 119 connection_state_callbacks_;
113 }; 120 };
114 121
115 } // namespace media_router 122 } // namespace media_router
116 123
117 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ 124 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698