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

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

Issue 11280290: events: Change gesture-event handler in EventHandler to not return any values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/toolbar/toolbar_model.h" 7 #include "chrome/browser/ui/toolbar/toolbar_model.h"
8 #include "chrome/browser/ui/view_ids.h" 8 #include "chrome/browser/ui/view_ids.h"
9 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" 9 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
10 #include "chrome/browser/ui/zoom/zoom_controller.h" 10 #include "chrome/browser/ui/zoom/zoom_controller.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 bool ZoomView::OnKeyPressed(const ui::KeyEvent& event) { 66 bool ZoomView::OnKeyPressed(const ui::KeyEvent& event) {
67 if (event.key_code() != ui::VKEY_SPACE && 67 if (event.key_code() != ui::VKEY_SPACE &&
68 event.key_code() != ui::VKEY_RETURN) { 68 event.key_code() != ui::VKEY_RETURN) {
69 return false; 69 return false;
70 } 70 }
71 71
72 ActivateBubble(); 72 ActivateBubble();
73 return true; 73 return true;
74 } 74 }
75 75
76 ui::EventResult ZoomView::OnGestureEvent(ui::GestureEvent* event) { 76 void ZoomView::OnGestureEvent(ui::GestureEvent* event) {
77 if (event->type() != ui::ET_GESTURE_TAP) 77 if (event->type() == ui::ET_GESTURE_TAP) {
78 return ui::ER_UNHANDLED; 78 ActivateBubble();
79 79 event->SetHandled();
80 ActivateBubble(); 80 }
81 return ui::ER_CONSUMED;
82 } 81 }
83 82
84 int ZoomView::GetBuiltInHorizontalPadding() const { 83 int ZoomView::GetBuiltInHorizontalPadding() const {
85 return GetBuiltInHorizontalPaddingImpl(); 84 return GetBuiltInHorizontalPaddingImpl();
86 } 85 }
87 86
88 void ZoomView::ActivateBubble() { 87 void ZoomView::ActivateBubble() {
89 ZoomBubbleView::ShowBubble( 88 ZoomBubbleView::ShowBubble(
90 this, location_bar_delegate_->GetWebContents(), false); 89 this, location_bar_delegate_->GetWebContents(), false);
91 } 90 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/zoom_view.h ('k') | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698