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

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

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit again Created 4 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/media_stream_infobar_delegate_android.h" 5 #include "chrome/browser/media/media_stream_infobar_delegate_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 bool MediaStreamInfoBarDelegateAndroid::IsRequestingVideoAccess() const { 66 bool MediaStreamInfoBarDelegateAndroid::IsRequestingVideoAccess() const {
67 return controller_->IsAskingForVideo(); 67 return controller_->IsAskingForVideo();
68 } 68 }
69 69
70 bool MediaStreamInfoBarDelegateAndroid::IsRequestingMicrophoneAccess() const { 70 bool MediaStreamInfoBarDelegateAndroid::IsRequestingMicrophoneAccess() const {
71 return controller_->IsAskingForAudio(); 71 return controller_->IsAskingForAudio();
72 } 72 }
73 73
74 infobars::InfoBarDelegate::InfoBarIdentifier
75 MediaStreamInfoBarDelegateAndroid::GetIdentifier() const {
76 return MEDIA_STREAM_INFOBAR_DELEGATE_ANDROID;
77 }
78
74 MediaStreamInfoBarDelegateAndroid::MediaStreamInfoBarDelegateAndroid( 79 MediaStreamInfoBarDelegateAndroid::MediaStreamInfoBarDelegateAndroid(
75 scoped_ptr<MediaStreamDevicesController> controller) 80 scoped_ptr<MediaStreamDevicesController> controller)
76 : ConfirmInfoBarDelegate(), controller_(std::move(controller)) { 81 : ConfirmInfoBarDelegate(), controller_(std::move(controller)) {
77 DCHECK(controller_.get()); 82 DCHECK(controller_.get());
78 DCHECK(controller_->IsAskingForAudio() || controller_->IsAskingForVideo()); 83 DCHECK(controller_->IsAskingForAudio() || controller_->IsAskingForVideo());
79 } 84 }
80 85
81 infobars::InfoBarDelegate::Type 86 infobars::InfoBarDelegate::Type
82 MediaStreamInfoBarDelegateAndroid::GetInfoBarType() const { 87 MediaStreamInfoBarDelegateAndroid::GetInfoBarType() const {
83 return PAGE_ACTION_TYPE; 88 return PAGE_ACTION_TYPE;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return true; 143 return true;
139 } 144 }
140 145
141 base::string16 MediaStreamInfoBarDelegateAndroid::GetLinkText() const { 146 base::string16 MediaStreamInfoBarDelegateAndroid::GetLinkText() const {
142 return base::string16(); 147 return base::string16();
143 } 148 }
144 149
145 GURL MediaStreamInfoBarDelegateAndroid::GetLinkURL() const { 150 GURL MediaStreamInfoBarDelegateAndroid::GetLinkURL() const {
146 return GURL(chrome::kMediaAccessLearnMoreUrl); 151 return GURL(chrome::kMediaAccessLearnMoreUrl);
147 } 152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698