| 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_delegate.h" | 5 #include "ui/views/controls/menu/menu_delegate.h" |
| 6 | 6 |
| 7 #include "ui/events/event.h" | 7 #include "ui/events/event.h" |
| 8 #include "ui/views/controls/menu/menu_config.h" | 8 #include "ui/views/controls/menu/menu_config.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool MenuDelegate::GetContextualLabel(int id, base::string16* out) const { | 67 bool MenuDelegate::GetContextualLabel(int id, base::string16* out) const { |
| 68 return false; | 68 return false; |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool MenuDelegate::ShouldCloseAllMenusOnExecute(int id) { | 71 bool MenuDelegate::ShouldCloseAllMenusOnExecute(int id) { |
| 72 return true; | 72 return true; |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool MenuDelegate::ShouldCloseOnDragComplete() { |
| 76 return true; |
| 77 } |
| 78 |
| 75 void MenuDelegate::ExecuteCommand(int id, int mouse_event_flags) { | 79 void MenuDelegate::ExecuteCommand(int id, int mouse_event_flags) { |
| 76 ExecuteCommand(id); | 80 ExecuteCommand(id); |
| 77 } | 81 } |
| 78 | 82 |
| 79 bool MenuDelegate::ShouldExecuteCommandWithoutClosingMenu(int id, | 83 bool MenuDelegate::ShouldExecuteCommandWithoutClosingMenu(int id, |
| 80 const ui::Event& e) { | 84 const ui::Event& e) { |
| 81 return false; | 85 return false; |
| 82 } | 86 } |
| 83 | 87 |
| 84 bool MenuDelegate::IsTriggerableEvent(MenuItemView* source, | 88 bool MenuDelegate::IsTriggerableEvent(MenuItemView* source, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 int* right_margin) const { | 161 int* right_margin) const { |
| 158 *left_margin = 0; | 162 *left_margin = 0; |
| 159 *right_margin = 0; | 163 *right_margin = 0; |
| 160 } | 164 } |
| 161 | 165 |
| 162 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { | 166 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { |
| 163 return true; | 167 return true; |
| 164 } | 168 } |
| 165 | 169 |
| 166 } // namespace views | 170 } // namespace views |
| OLD | NEW |