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

Side by Side Diff: chrome/browser/media/router/media_router_base.cc

Issue 2951523002: Media Remoting: Add mojo interfaces between browser and extension. (Closed)
Patch Set: Addressed imcheng's comments. Removed OnStarted/Failed interface. Created 3 years, 5 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 #include "chrome/browser/media/router/media_router_base.h" 5 #include "chrome/browser/media/router/media_router_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 void MediaRouterBase::Shutdown() { 149 void MediaRouterBase::Shutdown() {
150 // The observer calls virtual methods on MediaRouter; it must be destroyed 150 // The observer calls virtual methods on MediaRouter; it must be destroyed
151 // outside of the dtor 151 // outside of the dtor
152 internal_routes_observer_.reset(); 152 internal_routes_observer_.reset();
153 } 153 }
154 154
155 void MediaRouterBase::DetachRouteController(const MediaRoute::Id& route_id, 155 void MediaRouterBase::DetachRouteController(const MediaRoute::Id& route_id,
156 MediaRouteController* controller) {} 156 MediaRouteController* controller) {}
157 157
158 void MediaRouterBase::RegisterRemotingSource(
159 int32_t tab_id,
160 CastRemotingConnector* remoting_source) {
161 auto it = remoting_sources_.find(tab_id);
162 if (it != remoting_sources_.end()) {
163 DCHECK(remoting_source == it->second);
164 return;
165 }
166 remoting_sources_.emplace(tab_id, std::move(remoting_source));
167 }
168
169 void MediaRouterBase::UnregisterRemotingSource(int32_t tab_id) {
170 auto it = remoting_sources_.find(tab_id);
171 DCHECK(it != remoting_sources_.end());
172 remoting_sources_.erase(it);
173 }
174
158 } // namespace media_router 175 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698