| OLD | NEW |
| 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/view_ids.h" | 8 #include "chrome/browser/ui/view_ids.h" |
| 9 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 9 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
| 10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 event->SetHandled(); | 72 event->SetHandled(); |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool ManagePasswordsIconView::OnMousePressed(const ui::MouseEvent& event) { | 76 bool ManagePasswordsIconView::OnMousePressed(const ui::MouseEvent& event) { |
| 77 // Do nothing until the mouse button is released. | 77 // Do nothing until the mouse button is released. |
| 78 return true; | 78 return true; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void ManagePasswordsIconView::OnMouseReleased(const ui::MouseEvent& event) { | 81 void ManagePasswordsIconView::OnMouseReleased(const ui::MouseEvent& event) { |
| 82 if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) { | 82 if (event.IsOnlyLeftMouseButton() && |
| 83 HitTestPoint(gfx::ToFlooredPoint(event.location()))) { |
| 83 ManagePasswordsBubbleView::ShowBubble( | 84 ManagePasswordsBubbleView::ShowBubble( |
| 84 location_bar_delegate_->GetWebContents(), | 85 location_bar_delegate_->GetWebContents(), |
| 85 ManagePasswordsBubbleView::USER_ACTION); | 86 ManagePasswordsBubbleView::USER_ACTION); |
| 86 } | 87 } |
| 87 } | 88 } |
| OLD | NEW |