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

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/net/spdyproxy/data_reduction_proxy_infobar_delegate.h" 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "components/infobars/core/infobar.h" 9 #include "components/infobars/core/infobar.h"
10 #include "components/infobars/core/infobar_delegate.h" 10 #include "components/infobars/core/infobar_delegate.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 base::string16 DataReductionProxyInfoBarDelegate::GetMessageText() const { 53 base::string16 DataReductionProxyInfoBarDelegate::GetMessageText() const {
54 return base::string16(); 54 return base::string16();
55 } 55 }
56 56
57 int DataReductionProxyInfoBarDelegate::GetButtons() const { 57 int DataReductionProxyInfoBarDelegate::GetButtons() const {
58 return BUTTON_NONE; 58 return BUTTON_NONE;
59 } 59 }
60 60
61 GURL DataReductionProxyInfoBarDelegate::GetLinkURL() const {
62 return GURL(link_url_);
63 }
64
61 bool DataReductionProxyInfoBarDelegate::LinkClicked( 65 bool DataReductionProxyInfoBarDelegate::LinkClicked(
62 WindowOpenDisposition disposition) { 66 WindowOpenDisposition disposition) {
63 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( 67 ConfirmInfoBarDelegate::LinkClicked(disposition);
64 content::OpenURLParams(
65 GURL(link_url_),
66 content::Referrer(),
67 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
68 ui::PAGE_TRANSITION_LINK, false));
69 return true; 68 return true;
70 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698