| 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_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void(const mojo::String& route_id, | 78 void(const mojo::String& route_id, |
| 79 const ListenForRouteMessagesCallback& callback)); | 79 const ListenForRouteMessagesCallback& callback)); |
| 80 MOCK_METHOD1(StopListeningForRouteMessages, | 80 MOCK_METHOD1(StopListeningForRouteMessages, |
| 81 void(const mojo::String& route_id)); | 81 void(const mojo::String& route_id)); |
| 82 MOCK_METHOD1(OnPresentationSessionDetached, | 82 MOCK_METHOD1(OnPresentationSessionDetached, |
| 83 void(const mojo::String& route_id)); | 83 void(const mojo::String& route_id)); |
| 84 MOCK_METHOD1(StartObservingMediaRoutes, void(const mojo::String& source)); | 84 MOCK_METHOD1(StartObservingMediaRoutes, void(const mojo::String& source)); |
| 85 MOCK_METHOD1(StopObservingMediaRoutes, void(const mojo::String& source)); | 85 MOCK_METHOD1(StopObservingMediaRoutes, void(const mojo::String& source)); |
| 86 MOCK_METHOD0(EnableMdnsDiscovery, void()); | 86 MOCK_METHOD0(EnableMdnsDiscovery, void()); |
| 87 MOCK_METHOD1(UpdateMediaSinks, void(const mojo::String& source)); | 87 MOCK_METHOD1(UpdateMediaSinks, void(const mojo::String& source)); |
| 88 void SearchSinksAndCreateRoute( |
| 89 const mojo::String& sink_id, |
| 90 const mojo::String& media_source, |
| 91 interfaces::SinkSearchCriteriaPtr search_criteria, |
| 92 const mojo::String& presentation_id, |
| 93 const mojo::String& origin, |
| 94 int32_t tab_id, |
| 95 int64_t timeout_millis, |
| 96 bool off_the_record, |
| 97 const SearchSinksAndCreateRouteCallback& callback) override { |
| 98 SearchSinksAndCreateRoute_(sink_id, media_source, search_criteria, |
| 99 presentation_id, origin, tab_id, timeout_millis, |
| 100 off_the_record, callback); |
| 101 } |
| 102 MOCK_METHOD9(SearchSinksAndCreateRoute_, |
| 103 void(const mojo::String& sink_id, |
| 104 const mojo::String& media_source, |
| 105 interfaces::SinkSearchCriteriaPtr& search_criteria, |
| 106 const mojo::String& presentation_id, |
| 107 const mojo::String& origin, |
| 108 int32_t tab_id, |
| 109 int64_t timeout_millis, |
| 110 bool off_the_record, |
| 111 const SearchSinksAndCreateRouteCallback& callback)); |
| 88 | 112 |
| 89 private: | 113 private: |
| 90 DISALLOW_COPY_AND_ASSIGN(MockMediaRouteProvider); | 114 DISALLOW_COPY_AND_ASSIGN(MockMediaRouteProvider); |
| 91 }; | 115 }; |
| 92 | 116 |
| 93 class MockEventPageTracker : public extensions::EventPageTracker { | 117 class MockEventPageTracker : public extensions::EventPageTracker { |
| 94 public: | 118 public: |
| 95 MockEventPageTracker(); | 119 MockEventPageTracker(); |
| 96 ~MockEventPageTracker(); | 120 ~MockEventPageTracker(); |
| 97 | 121 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 scoped_refptr<extensions::Extension> extension_; | 155 scoped_refptr<extensions::Extension> extension_; |
| 132 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_; | 156 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_; |
| 133 std::unique_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_; | 157 std::unique_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_; |
| 134 | 158 |
| 135 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); | 159 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); |
| 136 }; | 160 }; |
| 137 | 161 |
| 138 } // namespace media_router | 162 } // namespace media_router |
| 139 | 163 |
| 140 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ | 164 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ |
| OLD | NEW |