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

Unified Diff: ui/views/context_menu_controller.h

Issue 9665008: views: Nuke is_mouse_gesture parameter from ContextMenuController::ShowContextMenuForView(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/context_menu_controller.h
diff --git a/ui/views/context_menu_controller.h b/ui/views/context_menu_controller.h
index 5bee8b71256c3ea64fa0d808f187f1a8d5d6626a..36337f94e0bccd77cf2e7a81e4352f14a03f5477 100644
--- a/ui/views/context_menu_controller.h
+++ b/ui/views/context_menu_controller.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -15,6 +15,11 @@ class Point;
namespace views {
class View;
+enum GestureType {
+ GESTURE_TYPE_API,
+ GESTURE_TYPE_USER,
+};
+
// ContextMenuController is responsible for showing the context menu for a
// View. To use a ContextMenuController invoke set_context_menu_controller on a
// View. When the appropriate user gesture occurs ShowContextMenu is invoked
@@ -28,15 +33,15 @@ class View;
// implementation for mouse processing.
class VIEWS_EXPORT ContextMenuController {
public:
- // Invoked to show the context menu for the source view. If |is_mouse_gesture|
- // is true, |p| is the location of the mouse. If |is_mouse_gesture| is false,
- // this method was not invoked by a mouse gesture and |p| is the recommended
- // location to show the menu at.
+ // Invoked to show the context menu for |source|. If |gesture_type| is
+ // GESTURE_TYPE_USER, |point| is the location of the mouse. Otherwise this
+ // method was not invoked by a mouse gesture and |point| is the recommended
+ // location to show the context menu at.
//
- // |p| is in screen coordinates.
+ // |point| is in screen coordinates.
virtual void ShowContextMenuForView(View* source,
- const gfx::Point& p,
- bool is_mouse_gesture) = 0;
+ const gfx::Point& point,
+ GestureType gesture_type) = 0;
tfarina 2012/03/09 19:23:29 Looks like this parameter isn't used at all. I mus
sky 2012/03/09 20:18:17 If that's true, nuke it.
protected:
virtual ~ContextMenuController() {}
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698