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

Side by Side Diff: chrome/browser/ui/views/location_bar/star_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/star_view.h" 5 #include "chrome/browser/ui/views/location_bar/star_view.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/bookmarks/bookmark_utils.h" 10 #include "chrome/browser/bookmarks/bookmark_utils.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 event.key_code() == ui::VKEY_RETURN) { 73 event.key_code() == ui::VKEY_RETURN) {
74 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint", 74 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint",
75 bookmark_utils::ENTRY_POINT_STAR_KEY, 75 bookmark_utils::ENTRY_POINT_STAR_KEY,
76 bookmark_utils::ENTRY_POINT_LIMIT); 76 bookmark_utils::ENTRY_POINT_LIMIT);
77 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE_FROM_STAR); 77 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE_FROM_STAR);
78 return true; 78 return true;
79 } 79 }
80 return false; 80 return false;
81 } 81 }
82 82
83 ui::EventResult StarView::OnGestureEvent(ui::GestureEvent* event) { 83 void StarView::OnGestureEvent(ui::GestureEvent* event) {
84 if (event->type() == ui::ET_GESTURE_TAP) { 84 if (event->type() == ui::ET_GESTURE_TAP) {
85 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint", 85 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint",
86 bookmark_utils::ENTRY_POINT_STAR_GESTURE, 86 bookmark_utils::ENTRY_POINT_STAR_GESTURE,
87 bookmark_utils::ENTRY_POINT_LIMIT); 87 bookmark_utils::ENTRY_POINT_LIMIT);
88 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE_FROM_STAR); 88 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE_FROM_STAR);
89 return ui::ER_CONSUMED; 89 event->SetHandled();
90 } 90 }
91 return ui::ER_UNHANDLED;
92 } 91 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/star_view.h ('k') | chrome/browser/ui/views/location_bar/zoom_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698