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

Side by Side Diff: chrome/browser/media/cast_remoting_connector.cc

Issue 2724173002: Media Remoting: Add browser tests. (Closed)
Patch Set: Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/cast_remoting_connector.h" 5 #include "chrome/browser/media/cast_remoting_connector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 return RemotingSinkCapabilities::RENDERING_ONLY; 170 return RemotingSinkCapabilities::RENDERING_ONLY;
171 } 171 }
172 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 172 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
173 return RemotingSinkCapabilities::NONE; 173 return RemotingSinkCapabilities::NONE;
174 } 174 }
175 } // namespace 175 } // namespace
176 176
177 CastRemotingConnector::CastRemotingConnector( 177 CastRemotingConnector::CastRemotingConnector(
178 media_router::MediaRouter* router, 178 media_router::MediaRouter* router,
179 const media_router::MediaSource::Id& media_source_id) 179 const media_router::MediaSource::Id& media_source_id)
180 : media_router::MediaRoutesObserver(router), 180 : media_router::MediaRoutesObserver(router, media_source_id),
181 media_source_id_(media_source_id), 181 media_source_id_(media_source_id),
182 enabled_features_(GetFeatureEnabledCapabilities()), 182 enabled_features_(GetFeatureEnabledCapabilities()),
183 session_counter_(0), 183 session_counter_(0),
184 active_bridge_(nullptr), 184 active_bridge_(nullptr),
185 weak_factory_(this) {} 185 weak_factory_(this) {}
186 186
187 CastRemotingConnector::~CastRemotingConnector() { 187 CastRemotingConnector::~CastRemotingConnector() {
188 // Assume nothing about destruction/shutdown sequence of a tab. For example, 188 // Assume nothing about destruction/shutdown sequence of a tab. For example,
189 // it's possible the owning WebContents will be destroyed before the Mojo 189 // it's possible the owning WebContents will be destroyed before the Mojo
190 // message pipes to the RemotingBridges have been closed. 190 // message pipes to the RemotingBridges have been closed.
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 media_router::MediaRoutesObserver::router(), route.media_route_id(), 504 media_router::MediaRoutesObserver::router(), route.media_route_id(),
505 this)); 505 this));
506 // TODO(miu): In the future, scan the route ID for sink capabilities 506 // TODO(miu): In the future, scan the route ID for sink capabilities
507 // properties and pass these to the source in the OnSinkAvailable() 507 // properties and pass these to the source in the OnSinkAvailable()
508 // notification. 508 // notification.
509 for (RemotingBridge* notifyee : bridges_) 509 for (RemotingBridge* notifyee : bridges_)
510 notifyee->OnSinkAvailable(enabled_features_); 510 notifyee->OnSinkAvailable(enabled_features_);
511 break; 511 break;
512 } 512 }
513 } 513 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/media_remoting/media_remoting_browser_test.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698