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

Unified Diff: ui/base/ui_base_types.h

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 6 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 | « ui/app_list/views/search_result_view.cc ('k') | ui/base/ui_base_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ui_base_types.h
diff --git a/ui/base/ui_base_types.h b/ui/base/ui_base_types.h
index 2f1bcec9eaed0d4ad9d7cdc2ad187538483f6c11..3b8ee9c7a5227d06d41c23f15962430af376af1c 100644
--- a/ui/base/ui_base_types.h
+++ b/ui/base/ui_base_types.h
@@ -5,8 +5,12 @@
#ifndef UI_BASE_UI_BASE_TYPES_H_
#define UI_BASE_UI_BASE_TYPES_H_
+#include "ui/base/ui_export.h"
+
namespace ui {
+class Event;
+
// Window "show" state. These values are written to disk so should not be
// changed.
enum WindowShowState {
@@ -37,6 +41,17 @@ enum ModalType {
MODAL_TYPE_SYSTEM = 3 // Window is modal to all other windows.
};
+// TODO(varunjain): Remove MENU_SOURCE_NONE (crbug.com/250964)
+enum MenuSourceType {
+ MENU_SOURCE_NONE = 0,
+ MENU_SOURCE_MOUSE = 1,
+ MENU_SOURCE_KEYBOARD = 2,
+ MENU_SOURCE_TOUCH = 3,
+ MENU_SOURCE_TOUCH_EDIT_MENU = 4,
+};
+
+UI_EXPORT MenuSourceType GetMenuSourceTypeForEvent(const ui::Event& event);
+
} // namespace ui
#endif // UI_BASE_UI_BASE_TYPES_H_
« no previous file with comments | « ui/app_list/views/search_result_view.cc ('k') | ui/base/ui_base_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698