| 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> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 11 #include "chrome/browser/media/router/issue.h" | 13 #include "chrome/browser/media/router/issue.h" |
| 12 #include "chrome/browser/media/router/media_route.h" | 14 #include "chrome/browser/media/router/media_route.h" |
| 13 #include "chrome/browser/media/router/media_router.h" | 15 #include "chrome/browser/media/router/media_router.h" |
| 14 #include "chrome/browser/media/router/media_sink.h" | 16 #include "chrome/browser/media/router/media_sink.h" |
| 15 #include "chrome/browser/media/router/media_source.h" | 17 #include "chrome/browser/media/router/media_source.h" |
| 16 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 17 | 19 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 36 content::WebContents* web_contents, | 38 content::WebContents* web_contents, |
| 37 const std::vector<MediaRouteResponseCallback>& callbacks)); | 39 const std::vector<MediaRouteResponseCallback>& callbacks)); |
| 38 MOCK_METHOD1(DetachRoute, void(const MediaRoute::Id& route_id)); | 40 MOCK_METHOD1(DetachRoute, void(const MediaRoute::Id& route_id)); |
| 39 MOCK_METHOD1(TerminateRoute, void(const MediaRoute::Id& route_id)); | 41 MOCK_METHOD1(TerminateRoute, void(const MediaRoute::Id& route_id)); |
| 40 MOCK_METHOD3(SendRouteMessage, | 42 MOCK_METHOD3(SendRouteMessage, |
| 41 void(const MediaRoute::Id& route_id, | 43 void(const MediaRoute::Id& route_id, |
| 42 const std::string& message, | 44 const std::string& message, |
| 43 const SendRouteMessageCallback& callback)); | 45 const SendRouteMessageCallback& callback)); |
| 44 void SendRouteBinaryMessage( | 46 void SendRouteBinaryMessage( |
| 45 const MediaRoute::Id& route_id, | 47 const MediaRoute::Id& route_id, |
| 46 scoped_ptr<std::vector<uint8>> data, | 48 scoped_ptr<std::vector<uint8_t>> data, |
| 47 const SendRouteMessageCallback& callback) override { | 49 const SendRouteMessageCallback& callback) override { |
| 48 SendRouteBinaryMessageInternal(route_id, data.get(), callback); | 50 SendRouteBinaryMessageInternal(route_id, data.get(), callback); |
| 49 } | 51 } |
| 50 MOCK_METHOD3(SendRouteBinaryMessageInternal, | 52 MOCK_METHOD3(SendRouteBinaryMessageInternal, |
| 51 void(const MediaRoute::Id& route_id, | 53 void(const MediaRoute::Id& route_id, |
| 52 std::vector<uint8>* data, | 54 std::vector<uint8_t>* data, |
| 53 const SendRouteMessageCallback& callback)); | 55 const SendRouteMessageCallback& callback)); |
| 54 MOCK_METHOD1(AddIssue, void(const Issue& issue)); | 56 MOCK_METHOD1(AddIssue, void(const Issue& issue)); |
| 55 MOCK_METHOD1(ClearIssue, void(const Issue::Id& issue_id)); | 57 MOCK_METHOD1(ClearIssue, void(const Issue::Id& issue_id)); |
| 56 MOCK_METHOD1(OnPresentationSessionDetached, | 58 MOCK_METHOD1(OnPresentationSessionDetached, |
| 57 void(const MediaRoute::Id& route_id)); | 59 void(const MediaRoute::Id& route_id)); |
| 58 MOCK_CONST_METHOD0(HasLocalDisplayRoute, bool()); | 60 MOCK_CONST_METHOD0(HasLocalDisplayRoute, bool()); |
| 59 MOCK_CONST_METHOD0(HasLocalRoute, bool()); | 61 MOCK_CONST_METHOD0(HasLocalRoute, bool()); |
| 60 scoped_ptr<PresentationConnectionStateSubscription> | 62 scoped_ptr<PresentationConnectionStateSubscription> |
| 61 AddPresentationConnectionStateChangedCallback( | 63 AddPresentationConnectionStateChangedCallback( |
| 62 const MediaRoute::Id& route_id, | 64 const MediaRoute::Id& route_id, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 87 void(LocalMediaRoutesObserver* observer)); | 89 void(LocalMediaRoutesObserver* observer)); |
| 88 | 90 |
| 89 private: | 91 private: |
| 90 base::CallbackList<void(content::PresentationConnectionState)> | 92 base::CallbackList<void(content::PresentationConnectionState)> |
| 91 connection_state_callbacks_; | 93 connection_state_callbacks_; |
| 92 }; | 94 }; |
| 93 | 95 |
| 94 } // namespace media_router | 96 } // namespace media_router |
| 95 | 97 |
| 96 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ | 98 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ |
| OLD | NEW |