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.h" | 5 #include "chrome/browser/media/media_stream_infobar_delegate.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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 UMA_HISTOGRAM_ENUMERATION("Media.DevicePermissionActions", | 139 UMA_HISTOGRAM_ENUMERATION("Media.DevicePermissionActions", |
140 kDeny, kPermissionActionsMax); | 140 kDeny, kPermissionActionsMax); |
141 controller_->PermissionDenied(); | 141 controller_->PermissionDenied(); |
142 return true; | 142 return true; |
143 } | 143 } |
144 | 144 |
145 base::string16 MediaStreamInfoBarDelegate::GetLinkText() const { | 145 base::string16 MediaStreamInfoBarDelegate::GetLinkText() const { |
146 return base::string16(); | 146 return base::string16(); |
147 } | 147 } |
148 | 148 |
149 bool MediaStreamInfoBarDelegate::LinkClicked( | 149 GURL MediaStreamInfoBarDelegate::GetLinkURL() const { |
150 WindowOpenDisposition disposition) { | 150 return GURL(chrome::kMediaAccessLearnMoreUrl); |
151 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( | |
152 content::OpenURLParams( | |
153 GURL(chrome::kMediaAccessLearnMoreUrl), | |
154 content::Referrer(), | |
155 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | |
156 ui::PAGE_TRANSITION_LINK, false)); | |
157 | |
158 return false; // Do not dismiss the info bar. | |
159 } | 151 } |
OLD | NEW |