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

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

Issue 230453004: Remove InfoBarDelegate::web_contents() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 6 years, 8 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 | Annotate | Revision Log
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.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/google/google_util.h" 10 #include "chrome/browser/google/google_util.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 controller_->Deny(true, content::MEDIA_DEVICE_PERMISSION_DENIED); 130 controller_->Deny(true, content::MEDIA_DEVICE_PERMISSION_DENIED);
131 return true; 131 return true;
132 } 132 }
133 133
134 base::string16 MediaStreamInfoBarDelegate::GetLinkText() const { 134 base::string16 MediaStreamInfoBarDelegate::GetLinkText() const {
135 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); 135 return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
136 } 136 }
137 137
138 bool MediaStreamInfoBarDelegate::LinkClicked( 138 bool MediaStreamInfoBarDelegate::LinkClicked(
139 WindowOpenDisposition disposition) { 139 WindowOpenDisposition disposition) {
140 web_contents()->OpenURL(content::OpenURLParams( 140 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL(
141 google_util::AppendGoogleLocaleParam( 141 content::OpenURLParams(
142 GURL(chrome::kMediaAccessLearnMoreUrl)), 142 google_util::AppendGoogleLocaleParam(
143 content::Referrer(), 143 GURL(chrome::kMediaAccessLearnMoreUrl)),
144 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 144 content::Referrer(),
145 content::PAGE_TRANSITION_LINK, 145 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
146 false)); 146 content::PAGE_TRANSITION_LINK, false));
147 147
148 return false; // Do not dismiss the info bar. 148 return false; // Do not dismiss the info bar.
149 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698