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

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

Issue 1173753003: [Media Router] Implement JoinRoute + update CreateRoute API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix again x2 Created 5 years, 6 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_MEDIA_ROUTER_MOJO_IMPL_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 static void BindToRequest( 54 static void BindToRequest(
55 const std::string& extension_id, 55 const std::string& extension_id,
56 content::BrowserContext* context, 56 content::BrowserContext* context,
57 mojo::InterfaceRequest<interfaces::MediaRouterObserver> request); 57 mojo::InterfaceRequest<interfaces::MediaRouterObserver> request);
58 58
59 // MediaRouter implementation. 59 // MediaRouter implementation.
60 // Execution of the requests is delegated to the Do* methods, which can be 60 // Execution of the requests is delegated to the Do* methods, which can be
61 // enqueued for later use if the extension is temporarily suspended. 61 // enqueued for later use if the extension is temporarily suspended.
62 void CreateRoute(const MediaSource::Id& source_id, 62 void CreateRoute(const MediaSource::Id& source_id,
63 const MediaSink::Id& sink_id, 63 const MediaSink::Id& sink_id,
64 const GURL& origin,
65 int tab_id,
64 const MediaRouteResponseCallback& callback) override; 66 const MediaRouteResponseCallback& callback) override;
67 void JoinRoute(const MediaSource::Id& source_id,
68 const std::string& presentation_id,
69 const GURL& origin,
70 int tab_id,
71 const MediaRouteResponseCallback& callback) override;
65 void CloseRoute(const MediaRoute::Id& route_id) override; 72 void CloseRoute(const MediaRoute::Id& route_id) override;
66 void SendRouteMessage(const MediaRoute::Id& route_id, 73 void SendRouteMessage(const MediaRoute::Id& route_id,
67 const std::string& message, 74 const std::string& message,
68 const SendRouteMessageCallback& callback) override; 75 const SendRouteMessageCallback& callback) override;
69 void ClearIssue(const Issue::Id& issue_id) override; 76 void ClearIssue(const Issue::Id& issue_id) override;
70 void RegisterMediaSinksObserver(MediaSinksObserver* observer) override; 77 void RegisterMediaSinksObserver(MediaSinksObserver* observer) override;
71 void UnregisterMediaSinksObserver(MediaSinksObserver* observer) override; 78 void UnregisterMediaSinksObserver(MediaSinksObserver* observer) override;
72 void RegisterMediaRoutesObserver(MediaRoutesObserver* observer) override; 79 void RegisterMediaRoutesObserver(MediaRoutesObserver* observer) override;
73 void UnregisterMediaRoutesObserver(MediaRoutesObserver* observer) override; 80 void UnregisterMediaRoutesObserver(MediaRoutesObserver* observer) override;
74 void AddIssuesObserver(IssuesObserver* observer) override; 81 void AddIssuesObserver(IssuesObserver* observer) override;
(...skipping 28 matching lines...) Expand all
103 // Runs a closure if the extension monitored by |extension_monitor_| is 110 // Runs a closure if the extension monitored by |extension_monitor_| is
104 // active, or defers it for later execution if the extension is suspended. 111 // active, or defers it for later execution if the extension is suspended.
105 void RunOrDefer(const base::Closure& request); 112 void RunOrDefer(const base::Closure& request);
106 113
107 // Dispatches the Mojo requests queued in |pending_requests_|. 114 // Dispatches the Mojo requests queued in |pending_requests_|.
108 void ExecutePendingRequests(); 115 void ExecutePendingRequests();
109 116
110 // These calls invoke methods in the component extension via Mojo. 117 // These calls invoke methods in the component extension via Mojo.
111 void DoCreateRoute(const MediaSource::Id& source_id, 118 void DoCreateRoute(const MediaSource::Id& source_id,
112 const MediaSink::Id& sink_id, 119 const MediaSink::Id& sink_id,
120 const std::string& origin,
121 int tab_id,
113 const MediaRouteResponseCallback& callback); 122 const MediaRouteResponseCallback& callback);
123 void DoJoinRoute(const MediaSource::Id& source_id,
124 const std::string& presentation_id,
125 const std::string& origin,
126 int tab_id,
127 const MediaRouteResponseCallback& callback);
114 void DoCloseRoute(const MediaRoute::Id& route_id); 128 void DoCloseRoute(const MediaRoute::Id& route_id);
115 void DoSendSessionMessage(const MediaRoute::Id& route_id, 129 void DoSendSessionMessage(const MediaRoute::Id& route_id,
116 const std::string& message, 130 const std::string& message,
117 const SendRouteMessageCallback& callback); 131 const SendRouteMessageCallback& callback);
118 void DoClearIssue(const Issue::Id& issue_id); 132 void DoClearIssue(const Issue::Id& issue_id);
119 void DoStartObservingMediaSinks(const std::string& source_id); 133 void DoStartObservingMediaSinks(const MediaSource::Id& source_id);
120 void DoStopObservingMediaSinks(const std::string& source_id); 134 void DoStopObservingMediaSinks(const MediaSource::Id& source_id);
121 void DoStartObservingMediaRoutes(); 135 void DoStartObservingMediaRoutes();
122 void DoStopObservingMediaRoutes(); 136 void DoStopObservingMediaRoutes();
123 void DoStartObservingIssues(); 137 void DoStartObservingIssues();
124 void DoStopObservingIssues(); 138 void DoStopObservingIssues();
125 139
126 // mojo::ErrorHandler implementation. 140 // mojo::ErrorHandler implementation.
127 void OnConnectionError() override; 141 void OnConnectionError() override;
128 142
129 // interfaces::MediaRouterObserver implementation. 143 // interfaces::MediaRouterObserver implementation.
130 void ProvideMediaRouter( 144 void ProvideMediaRouter(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 std::string instance_id_; 187 std::string instance_id_;
174 188
175 base::ThreadChecker thread_checker_; 189 base::ThreadChecker thread_checker_;
176 190
177 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); 191 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl);
178 }; 192 };
179 193
180 } // namespace media_router 194 } // namespace media_router
181 195
182 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ 196 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router.mojom ('k') | chrome/browser/media/router/media_router_mojo_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698