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

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

Issue 2678123003: Revert of Convert MediaRouter mojom apis to intake url::Origin objects instead of strings (Closed)
Patch Set: Created 3 years, 10 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "chrome/browser/media/router/issue.h" 13 #include "chrome/browser/media/router/issue.h"
14 #include "chrome/browser/media/router/media_route.h" 14 #include "chrome/browser/media/router/media_route.h"
15 #include "chrome/browser/media/router/media_router_base.h" 15 #include "chrome/browser/media/router/media_router_base.h"
16 #include "chrome/browser/media/router/media_sink.h" 16 #include "chrome/browser/media/router/media_sink.h"
17 #include "chrome/browser/media/router/media_source.h" 17 #include "chrome/browser/media/router/media_source.h"
18 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
19 #include "url/origin.h"
20 19
21 namespace media_router { 20 namespace media_router {
22 21
23 // Media Router mock class. Used for testing purposes. 22 // Media Router mock class. Used for testing purposes.
24 class MockMediaRouter : public MediaRouterBase { 23 class MockMediaRouter : public MediaRouterBase {
25 public: 24 public:
26 MockMediaRouter(); 25 MockMediaRouter();
27 ~MockMediaRouter() override; 26 ~MockMediaRouter() override;
28 27
29 MOCK_METHOD7(CreateRoute, 28 MOCK_METHOD7(CreateRoute,
30 void(const MediaSource::Id& source, 29 void(const MediaSource::Id& source,
31 const MediaSink::Id& sink_id, 30 const MediaSink::Id& sink_id,
32 const url::Origin& origin, 31 const GURL& origin,
33 content::WebContents* web_contents, 32 content::WebContents* web_contents,
34 const std::vector<MediaRouteResponseCallback>& callbacks, 33 const std::vector<MediaRouteResponseCallback>& callbacks,
35 base::TimeDelta timeout, 34 base::TimeDelta timeout,
36 bool incognito)); 35 bool incognito));
37 MOCK_METHOD7(JoinRoute, 36 MOCK_METHOD7(JoinRoute,
38 void(const MediaSource::Id& source, 37 void(const MediaSource::Id& source,
39 const std::string& presentation_id, 38 const std::string& presentation_id,
40 const url::Origin& origin, 39 const GURL& origin,
41 content::WebContents* web_contents, 40 content::WebContents* web_contents,
42 const std::vector<MediaRouteResponseCallback>& callbacks, 41 const std::vector<MediaRouteResponseCallback>& callbacks,
43 base::TimeDelta timeout, 42 base::TimeDelta timeout,
44 bool incognito)); 43 bool incognito));
45 MOCK_METHOD7(ConnectRouteByRouteId, 44 MOCK_METHOD7(ConnectRouteByRouteId,
46 void(const MediaSource::Id& source, 45 void(const MediaSource::Id& source,
47 const MediaRoute::Id& route_id, 46 const MediaRoute::Id& route_id,
48 const url::Origin& origin, 47 const GURL& origin,
49 content::WebContents* web_contents, 48 content::WebContents* web_contents,
50 const std::vector<MediaRouteResponseCallback>& callbacks, 49 const std::vector<MediaRouteResponseCallback>& callbacks,
51 base::TimeDelta timeout, 50 base::TimeDelta timeout,
52 bool incognito)); 51 bool incognito));
53 MOCK_METHOD1(DetachRoute, void(const MediaRoute::Id& route_id)); 52 MOCK_METHOD1(DetachRoute, void(const MediaRoute::Id& route_id));
54 MOCK_METHOD1(TerminateRoute, void(const MediaRoute::Id& route_id)); 53 MOCK_METHOD1(TerminateRoute, void(const MediaRoute::Id& route_id));
55 MOCK_METHOD3(SendRouteMessage, 54 MOCK_METHOD3(SendRouteMessage,
56 void(const MediaRoute::Id& route_id, 55 void(const MediaRoute::Id& route_id,
57 const std::string& message, 56 const std::string& message,
58 const SendRouteMessageCallback& callback)); 57 const SendRouteMessageCallback& callback));
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 107
109 private: 108 private:
110 base::CallbackList<void( 109 base::CallbackList<void(
111 const content::PresentationConnectionStateChangeInfo&)> 110 const content::PresentationConnectionStateChangeInfo&)>
112 connection_state_callbacks_; 111 connection_state_callbacks_;
113 }; 112 };
114 113
115 } // namespace media_router 114 } // namespace media_router
116 115
117 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ 116 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_sinks_observer_unittest.cc ('k') | chrome/browser/media/router/mojo/media_router.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698