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

Unified Diff: ui/views/test/menu_test_utils.cc

Issue 2778383002: MenuController Do Not SetSelection to Empty Items on Drag (Closed)
Patch Set: Make logic readible Created 3 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 | « ui/views/test/menu_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/menu_test_utils.cc
diff --git a/ui/views/test/menu_test_utils.cc b/ui/views/test/menu_test_utils.cc
index 3b69f3be5541a53b221ae9b06e43ab4bd2b8b75f..6e64f7441cd44168f5559b3e2a23272af0507bfc 100644
--- a/ui/views/test/menu_test_utils.cc
+++ b/ui/views/test/menu_test_utils.cc
@@ -20,6 +20,15 @@ TestMenuDelegate::TestMenuDelegate()
TestMenuDelegate::~TestMenuDelegate() {}
+bool TestMenuDelegate::ShowContextMenu(MenuItemView* source,
+ int id,
+ const gfx::Point& p,
+ ui::MenuSourceType source_type) {
+ show_context_menu_count_++;
+ show_context_menu_source_ = source;
+ return true;
+}
+
void TestMenuDelegate::ExecuteCommand(int id) {
execute_command_id_ = id;
}
@@ -45,6 +54,11 @@ int TestMenuDelegate::GetDragOperations(MenuItemView* sender) {
void TestMenuDelegate::WriteDragData(MenuItemView* sender,
OSExchangeData* data) {}
+void TestMenuDelegate::WillHideMenu(MenuItemView* menu) {
+ will_hide_menu_count_++;
+ will_hide_menu_ = menu;
+}
+
// MenuControllerTestApi ------------------------------------------------------
MenuControllerTestApi::MenuControllerTestApi()
« no previous file with comments | « ui/views/test/menu_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698