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

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

Issue 1361253002: Separate the URL of an infobar link with clicking on it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pkasting Created 5 years, 2 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.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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698