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

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

Issue 247193002: Remove touch layout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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"
11 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 13
14 ManagePasswordsIconView::ManagePasswordsIconView( 14 ManagePasswordsIconView::ManagePasswordsIconView(
15 LocationBarView::Delegate* location_bar_delegate) 15 LocationBarView::Delegate* location_bar_delegate)
16 : location_bar_delegate_(location_bar_delegate) { 16 : location_bar_delegate_(location_bar_delegate) {
17 SetAccessibilityFocusable(true); 17 SetAccessibilityFocusable(true);
18 Update(NULL); 18 Update(NULL);
19 LocationBarView::InitTouchableLocationBarChildView(this);
20 } 19 }
21 20
22 ManagePasswordsIconView::~ManagePasswordsIconView() {} 21 ManagePasswordsIconView::~ManagePasswordsIconView() {}
23 22
24 void ManagePasswordsIconView::Update( 23 void ManagePasswordsIconView::Update(
25 ManagePasswordsBubbleUIController* manage_passwords_bubble_ui_controller) { 24 ManagePasswordsBubbleUIController* manage_passwords_bubble_ui_controller) {
26 SetVisible(manage_passwords_bubble_ui_controller && 25 SetVisible(manage_passwords_bubble_ui_controller &&
27 manage_passwords_bubble_ui_controller-> 26 manage_passwords_bubble_ui_controller->
28 manage_passwords_icon_to_be_shown() && 27 manage_passwords_icon_to_be_shown() &&
29 !location_bar_delegate_->GetToolbarModel()->input_in_progress()); 28 !location_bar_delegate_->GetToolbarModel()->input_in_progress());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return true; 80 return true;
82 } 81 }
83 82
84 void ManagePasswordsIconView::OnMouseReleased(const ui::MouseEvent& event) { 83 void ManagePasswordsIconView::OnMouseReleased(const ui::MouseEvent& event) {
85 if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) { 84 if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) {
86 ManagePasswordsBubbleView::ShowBubble( 85 ManagePasswordsBubbleView::ShowBubble(
87 location_bar_delegate_->GetWebContents(), 86 location_bar_delegate_->GetWebContents(),
88 ManagePasswordsBubbleView::USER_ACTION); 87 ManagePasswordsBubbleView::USER_ACTION);
89 } 88 }
90 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698