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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc

Issue 232753002: Password bubble: Deplatformify ManagePasswordsBubbleView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback. 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/views/passwords/manage_passwords_icon_view.h" 5 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h"
6 6
7 #include "chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.h" 7 #include "chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.h"
8 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" 8 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
(...skipping 10 matching lines...) Expand all
21 21
22 ManagePasswordsIconView::~ManagePasswordsIconView() {} 22 ManagePasswordsIconView::~ManagePasswordsIconView() {}
23 23
24 void ManagePasswordsIconView::Update( 24 void ManagePasswordsIconView::Update(
25 ManagePasswordsBubbleUIController* manage_passwords_bubble_ui_controller) { 25 ManagePasswordsBubbleUIController* manage_passwords_bubble_ui_controller) {
26 SetVisible(manage_passwords_bubble_ui_controller && 26 SetVisible(manage_passwords_bubble_ui_controller &&
27 manage_passwords_bubble_ui_controller-> 27 manage_passwords_bubble_ui_controller->
28 manage_passwords_icon_to_be_shown() && 28 manage_passwords_icon_to_be_shown() &&
29 !location_bar_delegate_->GetToolbarModel()->input_in_progress()); 29 !location_bar_delegate_->GetToolbarModel()->input_in_progress());
30 if (!visible()) { 30 if (!visible()) {
31 ManagePasswordsBubbleView::CloseBubble( 31 ManagePasswordsBubbleView::CloseBubble();
32 password_manager::metrics_util::NOT_DISPLAYED);
33 return; 32 return;
34 } 33 }
35 int icon_to_display = 34 int icon_to_display =
36 manage_passwords_bubble_ui_controller->autofill_blocked() 35 manage_passwords_bubble_ui_controller->autofill_blocked()
37 ? IDR_SAVE_PASSWORD_BLACKLISTED 36 ? IDR_SAVE_PASSWORD_BLACKLISTED
38 : IDR_SAVE_PASSWORD; 37 : IDR_SAVE_PASSWORD;
39 SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 38 SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
40 icon_to_display)); 39 icon_to_display));
41 SetTooltip(manage_passwords_bubble_ui_controller->password_to_be_saved()); 40 SetTooltip(manage_passwords_bubble_ui_controller->password_to_be_saved());
42 } 41 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 84 }
86 85
87 void ManagePasswordsIconView::OnMouseReleased(const ui::MouseEvent& event) { 86 void ManagePasswordsIconView::OnMouseReleased(const ui::MouseEvent& event) {
88 if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) { 87 if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) {
89 ManagePasswordsBubbleView::ShowBubble( 88 ManagePasswordsBubbleView::ShowBubble(
90 location_bar_delegate_->GetWebContents(), 89 location_bar_delegate_->GetWebContents(),
91 this, 90 this,
92 ManagePasswordsBubbleView::USER_ACTION); 91 ManagePasswordsBubbleView::USER_ACTION);
93 } 92 }
94 } 93 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698