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

Side by Side Diff: chrome/browser/password_manager/password_manager_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/password_manager/password_manager_infobar_delegate.h" 5 #include "chrome/browser/password_manager/password_manager_infobar_delegate.h"
6 6
7 #include "chrome/browser/infobars/infobar_service.h" 7 #include "chrome/browser/infobars/infobar_service.h"
8 #include "chrome/grit/chromium_strings.h" 8 #include "chrome/grit/chromium_strings.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "components/infobars/core/infobar.h" 10 #include "components/infobars/core/infobar.h"
(...skipping 22 matching lines...) Expand all
33 33
34 bool PasswordManagerInfoBarDelegate::ShouldExpire( 34 bool PasswordManagerInfoBarDelegate::ShouldExpire(
35 const NavigationDetails& details) const { 35 const NavigationDetails& details) const {
36 return !details.is_redirect && ConfirmInfoBarDelegate::ShouldExpire(details); 36 return !details.is_redirect && ConfirmInfoBarDelegate::ShouldExpire(details);
37 } 37 }
38 38
39 base::string16 PasswordManagerInfoBarDelegate::GetMessageText() const { 39 base::string16 PasswordManagerInfoBarDelegate::GetMessageText() const {
40 return message_; 40 return message_;
41 } 41 }
42 42
43 GURL PasswordManagerInfoBarDelegate::GetLinkURL() const {
44 return GURL(l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK_PAGE));
45 }
46
43 bool PasswordManagerInfoBarDelegate::LinkClicked( 47 bool PasswordManagerInfoBarDelegate::LinkClicked(
44 WindowOpenDisposition disposition) { 48 WindowOpenDisposition disposition) {
45 InfoBarService::WebContentsFromInfoBar(infobar()) 49 ConfirmInfoBarDelegate::LinkClicked(disposition);
46 ->OpenURL(content::OpenURLParams(
47 GURL(l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK_PAGE)),
48 content::Referrer(),
49 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
50 ui::PAGE_TRANSITION_LINK, false));
51 return true; 50 return true;
52 } 51 }
53 52
54 void PasswordManagerInfoBarDelegate::SetMessage(const base::string16& message) { 53 void PasswordManagerInfoBarDelegate::SetMessage(const base::string16& message) {
55 message_ = message; 54 message_ = message;
56 } 55 }
57 56
58 void PasswordManagerInfoBarDelegate::SetMessageLinkRange( 57 void PasswordManagerInfoBarDelegate::SetMessageLinkRange(
59 const gfx::Range& message_link_range) { 58 const gfx::Range& message_link_range) {
60 message_link_range_ = message_link_range; 59 message_link_range_ = message_link_range;
61 } 60 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_manager_infobar_delegate.h ('k') | chrome/browser/pepper_broker_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698