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

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

Issue 2627463003: Convert MediaRouter mojom apis to intake url::Origin objects instead of strings (Closed)
Patch Set: Add missing dependency for extensions_renderer_resources target 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"
19 20
20 namespace media_router { 21 namespace media_router {
21 22
22 // Media Router mock class. Used for testing purposes. 23 // Media Router mock class. Used for testing purposes.
23 class MockMediaRouter : public MediaRouterBase { 24 class MockMediaRouter : public MediaRouterBase {
24 public: 25 public:
25 MockMediaRouter(); 26 MockMediaRouter();
26 ~MockMediaRouter() override; 27 ~MockMediaRouter() override;
27 28
28 MOCK_METHOD7(CreateRoute, 29 MOCK_METHOD7(CreateRoute,
29 void(const MediaSource::Id& source, 30 void(const MediaSource::Id& source,
30 const MediaSink::Id& sink_id, 31 const MediaSink::Id& sink_id,
31 const GURL& origin, 32 const url::Origin& origin,
32 content::WebContents* web_contents, 33 content::WebContents* web_contents,
33 const std::vector<MediaRouteResponseCallback>& callbacks, 34 const std::vector<MediaRouteResponseCallback>& callbacks,
34 base::TimeDelta timeout, 35 base::TimeDelta timeout,
35 bool incognito)); 36 bool incognito));
36 MOCK_METHOD7(JoinRoute, 37 MOCK_METHOD7(JoinRoute,
37 void(const MediaSource::Id& source, 38 void(const MediaSource::Id& source,
38 const std::string& presentation_id, 39 const std::string& presentation_id,
39 const GURL& origin, 40 const url::Origin& origin,
40 content::WebContents* web_contents, 41 content::WebContents* web_contents,
41 const std::vector<MediaRouteResponseCallback>& callbacks, 42 const std::vector<MediaRouteResponseCallback>& callbacks,
42 base::TimeDelta timeout, 43 base::TimeDelta timeout,
43 bool incognito)); 44 bool incognito));
44 MOCK_METHOD7(ConnectRouteByRouteId, 45 MOCK_METHOD7(ConnectRouteByRouteId,
45 void(const MediaSource::Id& source, 46 void(const MediaSource::Id& source,
46 const MediaRoute::Id& route_id, 47 const MediaRoute::Id& route_id,
47 const GURL& origin, 48 const url::Origin& origin,
48 content::WebContents* web_contents, 49 content::WebContents* web_contents,
49 const std::vector<MediaRouteResponseCallback>& callbacks, 50 const std::vector<MediaRouteResponseCallback>& callbacks,
50 base::TimeDelta timeout, 51 base::TimeDelta timeout,
51 bool incognito)); 52 bool incognito));
52 MOCK_METHOD1(DetachRoute, void(const MediaRoute::Id& route_id)); 53 MOCK_METHOD1(DetachRoute, void(const MediaRoute::Id& route_id));
53 MOCK_METHOD1(TerminateRoute, void(const MediaRoute::Id& route_id)); 54 MOCK_METHOD1(TerminateRoute, void(const MediaRoute::Id& route_id));
54 MOCK_METHOD3(SendRouteMessage, 55 MOCK_METHOD3(SendRouteMessage,
55 void(const MediaRoute::Id& route_id, 56 void(const MediaRoute::Id& route_id,
56 const std::string& message, 57 const std::string& message,
57 const SendRouteMessageCallback& callback)); 58 const SendRouteMessageCallback& callback));
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 108
108 private: 109 private:
109 base::CallbackList<void( 110 base::CallbackList<void(
110 const content::PresentationConnectionStateChangeInfo&)> 111 const content::PresentationConnectionStateChangeInfo&)>
111 connection_state_callbacks_; 112 connection_state_callbacks_;
112 }; 113 };
113 114
114 } // namespace media_router 115 } // namespace media_router
115 116
116 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ 117 #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