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

Side by Side Diff: chromecast/browser/media/media_caps_impl.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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 "chromecast/browser/media/media_caps_impl.h" 5 #include "chromecast/browser/media/media_caps_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chromecast/browser/media/supported_codec_finder.h" 8 #include "chromecast/browser/media/supported_codec_finder.h"
9 #include "chromecast/media/base/media_caps.h" 9 #include "chromecast/media/base/media_caps.h"
10 #include "chromecast/public/media/decoder_config.h" 10 #include "chromecast/public/media/decoder_config.h"
(...skipping 21 matching lines...) Expand all
32 current_mode_supports_dv_(false), 32 current_mode_supports_dv_(false),
33 screen_resolution_(0, 0) {} 33 screen_resolution_(0, 0) {}
34 34
35 MediaCapsImpl::~MediaCapsImpl() = default; 35 MediaCapsImpl::~MediaCapsImpl() = default;
36 36
37 void MediaCapsImpl::Initialize() { 37 void MediaCapsImpl::Initialize() {
38 media::SupportedCodecFinder supported_codec_finder; 38 media::SupportedCodecFinder supported_codec_finder;
39 supported_codec_finder.FindSupportedCodecProfileLevels(this); 39 supported_codec_finder.FindSupportedCodecProfileLevels(this);
40 } 40 }
41 41
42 void MediaCapsImpl::AddBinding(mojom::MediaCapsRequest request) { 42 void MediaCapsImpl::AddBinding(
43 const service_manager::BindSourceInfo& source_info,
44 mojom::MediaCapsRequest request) {
43 bindings_.AddBinding(this, std::move(request)); 45 bindings_.AddBinding(this, std::move(request));
44 } 46 }
45 47
46 void MediaCapsImpl::SetSupportedHdmiSinkCodecs( 48 void MediaCapsImpl::SetSupportedHdmiSinkCodecs(
47 unsigned int supported_codecs_bitmask) { 49 unsigned int supported_codecs_bitmask) {
48 supported_codecs_bitmask_ = supported_codecs_bitmask; 50 supported_codecs_bitmask_ = supported_codecs_bitmask;
49 51
50 observers_.ForAllPtrs( 52 observers_.ForAllPtrs(
51 [supported_codecs_bitmask](mojom::MediaCapsObserver* observer) { 53 [supported_codecs_bitmask](mojom::MediaCapsObserver* observer) {
52 observer->SupportedHdmiSinkCodecsChanged(supported_codecs_bitmask); 54 observer->SupportedHdmiSinkCodecsChanged(supported_codecs_bitmask);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 << " supported codec profile levels to observer."; 113 << " supported codec profile levels to observer.";
112 for (const auto& codec_profile_level : codec_profile_levels_) { 114 for (const auto& codec_profile_level : codec_profile_levels_) {
113 observer->AddSupportedCodecProfileLevel( 115 observer->AddSupportedCodecProfileLevel(
114 ConvertCodecProfileLevelToMojo(codec_profile_level)); 116 ConvertCodecProfileLevelToMojo(codec_profile_level));
115 } 117 }
116 observers_.AddPtr(std::move(observer)); 118 observers_.AddPtr(std::move(observer));
117 } 119 }
118 120
119 } // namespace media 121 } // namespace media
120 } // namespace chromecast 122 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/media/media_caps_impl.h ('k') | components/autofill/content/browser/content_autofill_driver_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698