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/ui/media_stream_infobar_delegate.h" | 5 #include "chrome/browser/ui/media_stream_infobar_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/infobars/infobar_tab_helper.h" | 8 #include "chrome/browser/infobars/infobar_tab_helper.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 content::MediaStreamDevices | 39 content::MediaStreamDevices |
40 MediaStreamInfoBarDelegate::GetAudioDevices() const { | 40 MediaStreamInfoBarDelegate::GetAudioDevices() const { |
41 return controller_->GetAudioDevices(); | 41 return controller_->GetAudioDevices(); |
42 } | 42 } |
43 | 43 |
44 content::MediaStreamDevices | 44 content::MediaStreamDevices |
45 MediaStreamInfoBarDelegate::GetVideoDevices() const { | 45 MediaStreamInfoBarDelegate::GetVideoDevices() const { |
46 return controller_->GetVideoDevices(); | 46 return controller_->GetVideoDevices(); |
47 } | 47 } |
48 | 48 |
49 const GURL& MediaStreamInfoBarDelegate::GetSecurityOrigin() const { | 49 const std::string& MediaStreamInfoBarDelegate::GetSecurityOriginSpec() const { |
50 return controller_->GetSecurityOrigin(); | 50 return controller_->GetSecurityOriginSpec(); |
| 51 } |
| 52 |
| 53 bool MediaStreamInfoBarDelegate::IsSafeToAlwaysAllowAudio() const { |
| 54 return controller_->IsSafeToAlwaysAllowAudio(); |
| 55 } |
| 56 |
| 57 bool MediaStreamInfoBarDelegate::IsSafeToAlwaysAllowVideo() const { |
| 58 return controller_->IsSafeToAlwaysAllowVideo(); |
51 } | 59 } |
52 | 60 |
53 void MediaStreamInfoBarDelegate::Accept() { | 61 void MediaStreamInfoBarDelegate::Accept() { |
54 DCHECK_NE(HasAudio(), selected_audio_device_.empty()); | 62 DCHECK_NE(HasAudio(), selected_audio_device_.empty()); |
55 DCHECK_NE(HasVideo(), selected_video_device_.empty()); | 63 DCHECK_NE(HasVideo(), selected_video_device_.empty()); |
56 | 64 |
57 controller_->Accept(selected_audio_device_, selected_video_device_, | 65 controller_->Accept(selected_audio_device_, selected_video_device_, |
58 always_allow_); | 66 always_allow_); |
59 } | 67 } |
60 | 68 |
(...skipping 16 matching lines...) Expand all Loading... |
77 } | 85 } |
78 | 86 |
79 InfoBarDelegate::Type MediaStreamInfoBarDelegate::GetInfoBarType() const { | 87 InfoBarDelegate::Type MediaStreamInfoBarDelegate::GetInfoBarType() const { |
80 return PAGE_ACTION_TYPE; | 88 return PAGE_ACTION_TYPE; |
81 } | 89 } |
82 | 90 |
83 MediaStreamInfoBarDelegate* | 91 MediaStreamInfoBarDelegate* |
84 MediaStreamInfoBarDelegate::AsMediaStreamInfoBarDelegate() { | 92 MediaStreamInfoBarDelegate::AsMediaStreamInfoBarDelegate() { |
85 return this; | 93 return this; |
86 } | 94 } |
OLD | NEW |