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

Side by Side Diff: chrome/browser/ui/views/location_bar/zoom_view.cc

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/location_bar/zoom_view.h" 5 #include "chrome/browser/ui/views/location_bar/zoom_view.h"
6 6
7 #include "chrome/browser/ui/views/browser_dialogs.h" 7 #include "chrome/browser/ui/views/browser_dialogs.h"
8 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" 8 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
9 #include "chrome/browser/ui/view_ids.h" 9 #include "chrome/browser/ui/view_ids.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void ZoomView::GetAccessibleState(ui::AccessibleViewState* state) { 61 void ZoomView::GetAccessibleState(ui::AccessibleViewState* state) {
62 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_ZOOM); 62 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_ZOOM);
63 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; 63 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
64 } 64 }
65 65
66 bool ZoomView::GetTooltipText(const gfx::Point& p, string16* tooltip) const { 66 bool ZoomView::GetTooltipText(const gfx::Point& p, string16* tooltip) const {
67 // Don't show tooltip if the zoom bubble is displayed. 67 // Don't show tooltip if the zoom bubble is displayed.
68 return !ZoomBubbleView::IsShowing() && ImageView::GetTooltipText(p, tooltip); 68 return !ZoomBubbleView::IsShowing() && ImageView::GetTooltipText(p, tooltip);
69 } 69 }
70 70
71 bool ZoomView::OnMousePressed(const views::MouseEvent& event) { 71 bool ZoomView::OnMousePressed(const ui::MouseEvent& event) {
72 // Do nothing until mouse is released. 72 // Do nothing until mouse is released.
73 return true; 73 return true;
74 } 74 }
75 75
76 void ZoomView::OnMouseReleased(const views::MouseEvent& event) { 76 void ZoomView::OnMouseReleased(const ui::MouseEvent& event) {
77 if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) { 77 if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) {
78 ZoomBubbleView::ShowBubble( 78 ZoomBubbleView::ShowBubble(
79 this, location_bar_delegate_->GetTabContents(), false); 79 this, location_bar_delegate_->GetTabContents(), false);
80 } 80 }
81 } 81 }
82 82
83 bool ZoomView::OnKeyPressed(const ui::KeyEvent& event) { 83 bool ZoomView::OnKeyPressed(const ui::KeyEvent& event) {
84 if (event.key_code() != ui::VKEY_SPACE && 84 if (event.key_code() != ui::VKEY_SPACE &&
85 event.key_code() != ui::VKEY_RETURN) 85 event.key_code() != ui::VKEY_RETURN)
86 return false; 86 return false;
87 87
88 ZoomBubbleView::ShowBubble( 88 ZoomBubbleView::ShowBubble(
89 this, location_bar_delegate_->GetTabContents(), false); 89 this, location_bar_delegate_->GetTabContents(), false);
90 return true; 90 return true;
91 } 91 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/zoom_view.h ('k') | chrome/browser/ui/views/omnibox/inline_omnibox_popup_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698