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

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

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Don't show tooltip if the zoom bubble is displayed. 66 // Don't show tooltip if the zoom bubble is displayed.
67 return !ZoomBubbleView::IsShowing() && ImageView::GetTooltipText(p, tooltip); 67 return !ZoomBubbleView::IsShowing() && ImageView::GetTooltipText(p, tooltip);
68 } 68 }
69 69
70 bool ZoomView::OnMousePressed(const views::MouseEvent& event) { 70 bool ZoomView::OnMousePressed(const views::MouseEvent& event) {
71 // Do nothing until mouse is released. 71 // Do nothing until mouse is released.
72 return true; 72 return true;
73 } 73 }
74 74
75 void ZoomView::OnMouseReleased(const views::MouseEvent& event) { 75 void ZoomView::OnMouseReleased(const views::MouseEvent& event) {
76 if (event.IsOnlyLeftMouseButton() && HitTest(event.location())) { 76 if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location())) {
77 ZoomBubbleView::ShowBubble( 77 ZoomBubbleView::ShowBubble(
78 this, location_bar_delegate_->GetTabContents(), false); 78 this, location_bar_delegate_->GetTabContents(), false);
79 } 79 }
80 } 80 }
81 81
82 bool ZoomView::OnKeyPressed(const views::KeyEvent& event) { 82 bool ZoomView::OnKeyPressed(const views::KeyEvent& event) {
83 if (event.key_code() != ui::VKEY_SPACE && 83 if (event.key_code() != ui::VKEY_SPACE &&
84 event.key_code() != ui::VKEY_RETURN) 84 event.key_code() != ui::VKEY_RETURN)
85 return false; 85 return false;
86 86
87 ZoomBubbleView::ShowBubble( 87 ZoomBubbleView::ShowBubble(
88 this, location_bar_delegate_->GetTabContents(), false); 88 this, location_bar_delegate_->GetTabContents(), false);
89 return true; 89 return true;
90 } 90 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/star_view.cc ('k') | chrome/browser/ui/views/omnibox/inline_omnibox_popup_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698