| OLD | NEW |
| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/infobars/infobar_service.h" | 10 #include "chrome/browser/infobars/infobar_service.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool MediaStreamInfoBarDelegateAndroid::IsRequestingVideoAccess() const { | 63 bool MediaStreamInfoBarDelegateAndroid::IsRequestingVideoAccess() const { |
| 64 return controller_->IsAskingForVideo(); | 64 return controller_->IsAskingForVideo(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool MediaStreamInfoBarDelegateAndroid::IsRequestingMicrophoneAccess() const { | 67 bool MediaStreamInfoBarDelegateAndroid::IsRequestingMicrophoneAccess() const { |
| 68 return controller_->IsAskingForAudio(); | 68 return controller_->IsAskingForAudio(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 std::string MediaStreamInfoBarDelegateAndroid::GetIdentifier() const { |
| 72 return "MediaStreamInfoBarDelegateAndroid"; |
| 73 } |
| 74 |
| 71 MediaStreamInfoBarDelegateAndroid::MediaStreamInfoBarDelegateAndroid( | 75 MediaStreamInfoBarDelegateAndroid::MediaStreamInfoBarDelegateAndroid( |
| 72 scoped_ptr<MediaStreamDevicesController> controller) | 76 scoped_ptr<MediaStreamDevicesController> controller) |
| 73 : ConfirmInfoBarDelegate(), controller_(controller.Pass()) { | 77 : ConfirmInfoBarDelegate(), controller_(controller.Pass()) { |
| 74 DCHECK(controller_.get()); | 78 DCHECK(controller_.get()); |
| 75 DCHECK(controller_->IsAskingForAudio() || controller_->IsAskingForVideo()); | 79 DCHECK(controller_->IsAskingForAudio() || controller_->IsAskingForVideo()); |
| 76 } | 80 } |
| 77 | 81 |
| 78 infobars::InfoBarDelegate::Type | 82 infobars::InfoBarDelegate::Type |
| 79 MediaStreamInfoBarDelegateAndroid::GetInfoBarType() const { | 83 MediaStreamInfoBarDelegateAndroid::GetInfoBarType() const { |
| 80 return PAGE_ACTION_TYPE; | 84 return PAGE_ACTION_TYPE; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 return true; | 139 return true; |
| 136 } | 140 } |
| 137 | 141 |
| 138 base::string16 MediaStreamInfoBarDelegateAndroid::GetLinkText() const { | 142 base::string16 MediaStreamInfoBarDelegateAndroid::GetLinkText() const { |
| 139 return base::string16(); | 143 return base::string16(); |
| 140 } | 144 } |
| 141 | 145 |
| 142 GURL MediaStreamInfoBarDelegateAndroid::GetLinkURL() const { | 146 GURL MediaStreamInfoBarDelegateAndroid::GetLinkURL() const { |
| 143 return GURL(chrome::kMediaAccessLearnMoreUrl); | 147 return GURL(chrome::kMediaAccessLearnMoreUrl); |
| 144 } | 148 } |
| OLD | NEW |