| OLD | NEW |
| 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 "ui/views/controls/menu/menu_config.h" | 5 #include "ui/views/controls/menu/menu_config.h" |
| 6 #include "ui/views/controls/menu/menu_delegate.h" | 6 #include "ui/views/controls/menu/menu_delegate.h" |
| 7 | 7 |
| 8 namespace views { | 8 namespace views { |
| 9 | 9 |
| 10 MenuDelegate::~MenuDelegate() {} | 10 MenuDelegate::~MenuDelegate() {} |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool MenuDelegate::ShouldCloseAllMenusOnExecute(int id) { | 52 bool MenuDelegate::ShouldCloseAllMenusOnExecute(int id) { |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 | 55 |
| 56 void MenuDelegate::ExecuteCommand(int id, int mouse_event_flags) { | 56 void MenuDelegate::ExecuteCommand(int id, int mouse_event_flags) { |
| 57 ExecuteCommand(id); | 57 ExecuteCommand(id); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool MenuDelegate::ShouldExecuteCommandWithoutClosingMenu(int id, |
| 61 const ui::Event& e) { |
| 62 return false; |
| 63 } |
| 64 |
| 60 bool MenuDelegate::IsTriggerableEvent(MenuItemView* source, | 65 bool MenuDelegate::IsTriggerableEvent(MenuItemView* source, |
| 61 const ui::Event& e) { | 66 const ui::Event& e) { |
| 62 return e.type() == ui::ET_GESTURE_TAP || | 67 return e.type() == ui::ET_GESTURE_TAP || |
| 63 e.type() == ui::ET_GESTURE_TAP_DOWN || | 68 e.type() == ui::ET_GESTURE_TAP_DOWN || |
| 64 (e.IsMouseEvent() && (e.flags() & | 69 (e.IsMouseEvent() && (e.flags() & |
| 65 (ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON))); | 70 (ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON))); |
| 66 } | 71 } |
| 67 | 72 |
| 68 bool MenuDelegate::CanDrop(MenuItemView* menu, const OSExchangeData& data) { | 73 bool MenuDelegate::CanDrop(MenuItemView* menu, const OSExchangeData& data) { |
| 69 return false; | 74 return false; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 return 800; | 126 return 800; |
| 122 } | 127 } |
| 123 | 128 |
| 124 void MenuDelegate::WillShowMenu(MenuItemView* menu) { | 129 void MenuDelegate::WillShowMenu(MenuItemView* menu) { |
| 125 } | 130 } |
| 126 | 131 |
| 127 void MenuDelegate::WillHideMenu(MenuItemView* menu) { | 132 void MenuDelegate::WillHideMenu(MenuItemView* menu) { |
| 128 } | 133 } |
| 129 | 134 |
| 130 } // namespace views | 135 } // namespace views |
| OLD | NEW |