| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 25 MockMediaRouter(); | 25 MockMediaRouter(); |
| 26 ~MockMediaRouter() override; | 26 ~MockMediaRouter() override; |
| 27 | 27 |
| 28 MOCK_METHOD7(CreateRoute, | 28 MOCK_METHOD7(CreateRoute, |
| 29 void(const MediaSource::Id& source, | 29 void(const MediaSource::Id& source, |
| 30 const MediaSink::Id& sink_id, | 30 const MediaSink::Id& sink_id, |
| 31 const GURL& origin, | 31 const GURL& origin, |
| 32 content::WebContents* web_contents, | 32 content::WebContents* web_contents, |
| 33 const std::vector<MediaRouteResponseCallback>& callbacks, | 33 const std::vector<MediaRouteResponseCallback>& callbacks, |
| 34 base::TimeDelta timeout, | 34 base::TimeDelta timeout, |
| 35 bool off_the_record)); | 35 bool incognito)); |
| 36 MOCK_METHOD7(JoinRoute, | 36 MOCK_METHOD7(JoinRoute, |
| 37 void(const MediaSource::Id& source, | 37 void(const MediaSource::Id& source, |
| 38 const std::string& presentation_id, | 38 const std::string& presentation_id, |
| 39 const GURL& origin, | 39 const GURL& origin, |
| 40 content::WebContents* web_contents, | 40 content::WebContents* web_contents, |
| 41 const std::vector<MediaRouteResponseCallback>& callbacks, | 41 const std::vector<MediaRouteResponseCallback>& callbacks, |
| 42 base::TimeDelta timeout, | 42 base::TimeDelta timeout, |
| 43 bool off_the_record)); | 43 bool incognito)); |
| 44 MOCK_METHOD7(ConnectRouteByRouteId, | 44 MOCK_METHOD7(ConnectRouteByRouteId, |
| 45 void(const MediaSource::Id& source, | 45 void(const MediaSource::Id& source, |
| 46 const MediaRoute::Id& route_id, | 46 const MediaRoute::Id& route_id, |
| 47 const GURL& origin, | 47 const GURL& origin, |
| 48 content::WebContents* web_contents, | 48 content::WebContents* web_contents, |
| 49 const std::vector<MediaRouteResponseCallback>& callbacks, | 49 const std::vector<MediaRouteResponseCallback>& callbacks, |
| 50 base::TimeDelta timeout, | 50 base::TimeDelta timeout, |
| 51 bool off_the_record)); | 51 bool incognito)); |
| 52 MOCK_METHOD1(DetachRoute, void(const MediaRoute::Id& route_id)); | 52 MOCK_METHOD1(DetachRoute, void(const MediaRoute::Id& route_id)); |
| 53 MOCK_METHOD1(TerminateRoute, void(const MediaRoute::Id& route_id)); | 53 MOCK_METHOD1(TerminateRoute, void(const MediaRoute::Id& route_id)); |
| 54 MOCK_METHOD3(SendRouteMessage, | 54 MOCK_METHOD3(SendRouteMessage, |
| 55 void(const MediaRoute::Id& route_id, | 55 void(const MediaRoute::Id& route_id, |
| 56 const std::string& message, | 56 const std::string& message, |
| 57 const SendRouteMessageCallback& callback)); | 57 const SendRouteMessageCallback& callback)); |
| 58 void SendRouteBinaryMessage( | 58 void SendRouteBinaryMessage( |
| 59 const MediaRoute::Id& route_id, | 59 const MediaRoute::Id& route_id, |
| 60 std::unique_ptr<std::vector<uint8_t>> data, | 60 std::unique_ptr<std::vector<uint8_t>> data, |
| 61 const SendRouteMessageCallback& callback) override { | 61 const SendRouteMessageCallback& callback) override { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 79 void(const MediaRoute::Id& route_id)); | 79 void(const MediaRoute::Id& route_id)); |
| 80 std::unique_ptr<PresentationConnectionStateSubscription> | 80 std::unique_ptr<PresentationConnectionStateSubscription> |
| 81 AddPresentationConnectionStateChangedCallback( | 81 AddPresentationConnectionStateChangedCallback( |
| 82 const MediaRoute::Id& route_id, | 82 const MediaRoute::Id& route_id, |
| 83 const content::PresentationConnectionStateChangedCallback& callback) | 83 const content::PresentationConnectionStateChangedCallback& callback) |
| 84 override { | 84 override { |
| 85 OnAddPresentationConnectionStateChangedCallbackInvoked(callback); | 85 OnAddPresentationConnectionStateChangedCallbackInvoked(callback); |
| 86 return connection_state_callbacks_.Add(callback); | 86 return connection_state_callbacks_.Add(callback); |
| 87 } | 87 } |
| 88 | 88 |
| 89 MOCK_METHOD0(OnOffTheRecordProfileShutdown, void()); | 89 MOCK_METHOD0(OnIncognitoProfileShutdown, void()); |
| 90 MOCK_METHOD1(OnAddPresentationConnectionStateChangedCallbackInvoked, | 90 MOCK_METHOD1(OnAddPresentationConnectionStateChangedCallbackInvoked, |
| 91 void(const content::PresentationConnectionStateChangedCallback& | 91 void(const content::PresentationConnectionStateChangedCallback& |
| 92 callback)); | 92 callback)); |
| 93 MOCK_METHOD1(RegisterIssuesObserver, void(IssuesObserver* observer)); | 93 MOCK_METHOD1(RegisterIssuesObserver, void(IssuesObserver* observer)); |
| 94 MOCK_METHOD1(UnregisterIssuesObserver, void(IssuesObserver* observer)); | 94 MOCK_METHOD1(UnregisterIssuesObserver, void(IssuesObserver* observer)); |
| 95 MOCK_METHOD1(RegisterMediaSinksObserver, bool(MediaSinksObserver* observer)); | 95 MOCK_METHOD1(RegisterMediaSinksObserver, bool(MediaSinksObserver* observer)); |
| 96 MOCK_METHOD1(UnregisterMediaSinksObserver, | 96 MOCK_METHOD1(UnregisterMediaSinksObserver, |
| 97 void(MediaSinksObserver* observer)); | 97 void(MediaSinksObserver* observer)); |
| 98 MOCK_METHOD1(RegisterMediaRoutesObserver, | 98 MOCK_METHOD1(RegisterMediaRoutesObserver, |
| 99 void(MediaRoutesObserver* observer)); | 99 void(MediaRoutesObserver* observer)); |
| 100 MOCK_METHOD1(UnregisterMediaRoutesObserver, | 100 MOCK_METHOD1(UnregisterMediaRoutesObserver, |
| 101 void(MediaRoutesObserver* observer)); | 101 void(MediaRoutesObserver* observer)); |
| 102 MOCK_METHOD1(RegisterPresentationSessionMessagesObserver, | 102 MOCK_METHOD1(RegisterPresentationSessionMessagesObserver, |
| 103 void(PresentationSessionMessagesObserver* observer)); | 103 void(PresentationSessionMessagesObserver* observer)); |
| 104 MOCK_METHOD1(UnregisterPresentationSessionMessagesObserver, | 104 MOCK_METHOD1(UnregisterPresentationSessionMessagesObserver, |
| 105 void(PresentationSessionMessagesObserver* observer)); | 105 void(PresentationSessionMessagesObserver* observer)); |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 base::CallbackList<void( | 108 base::CallbackList<void( |
| 109 const content::PresentationConnectionStateChangeInfo&)> | 109 const content::PresentationConnectionStateChangeInfo&)> |
| 110 connection_state_callbacks_; | 110 connection_state_callbacks_; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace media_router | 113 } // namespace media_router |
| 114 | 114 |
| 115 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ | 115 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ |
| OLD | NEW |