| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 const std::string& media_source, | 90 const std::string& media_source, |
| 91 mojom::SinkSearchCriteriaPtr search_criteria, | 91 mojom::SinkSearchCriteriaPtr search_criteria, |
| 92 const SearchSinksCallback& callback) override { | 92 const SearchSinksCallback& callback) override { |
| 93 SearchSinks_(sink_id, media_source, search_criteria, callback); | 93 SearchSinks_(sink_id, media_source, search_criteria, callback); |
| 94 } | 94 } |
| 95 MOCK_METHOD4(SearchSinks_, | 95 MOCK_METHOD4(SearchSinks_, |
| 96 void(const std::string& sink_id, | 96 void(const std::string& sink_id, |
| 97 const std::string& media_source, | 97 const std::string& media_source, |
| 98 mojom::SinkSearchCriteriaPtr& search_criteria, | 98 mojom::SinkSearchCriteriaPtr& search_criteria, |
| 99 const SearchSinksCallback& callback)); | 99 const SearchSinksCallback& callback)); |
| 100 void OnSinksDiscovered( |
| 101 std::vector<std::unique_ptr<MediaSink>> sinks) override { |
| 102 OnSinksDiscovered_(sinks); |
| 103 } |
| 104 MOCK_METHOD1(OnSinksDiscovered_, |
| 105 void(const std::vector<std::unique_ptr<MediaSink>>& sinks)); |
| 100 | 106 |
| 101 private: | 107 private: |
| 102 DISALLOW_COPY_AND_ASSIGN(MockMediaRouteProvider); | 108 DISALLOW_COPY_AND_ASSIGN(MockMediaRouteProvider); |
| 103 }; | 109 }; |
| 104 | 110 |
| 105 class MockEventPageTracker : public extensions::EventPageTracker { | 111 class MockEventPageTracker : public extensions::EventPageTracker { |
| 106 public: | 112 public: |
| 107 MockEventPageTracker(); | 113 MockEventPageTracker(); |
| 108 ~MockEventPageTracker(); | 114 ~MockEventPageTracker(); |
| 109 | 115 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 scoped_refptr<extensions::Extension> extension_; | 150 scoped_refptr<extensions::Extension> extension_; |
| 145 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_; | 151 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_; |
| 146 std::unique_ptr<mojo::Binding<mojom::MediaRouteProvider>> binding_; | 152 std::unique_ptr<mojo::Binding<mojom::MediaRouteProvider>> binding_; |
| 147 | 153 |
| 148 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); | 154 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); |
| 149 }; | 155 }; |
| 150 | 156 |
| 151 } // namespace media_router | 157 } // namespace media_router |
| 152 | 158 |
| 153 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ | 159 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ |
| OLD | NEW |