| 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 #ifndef UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 int GetRowCount() override; | 93 int GetRowCount() override; |
| 94 int GetSelectedRow() override; | 94 int GetSelectedRow() override; |
| 95 void SetSelectedRow(int row) override; | 95 void SetSelectedRow(int row) override; |
| 96 base::string16 GetTextForRow(int row) override; | 96 base::string16 GetTextForRow(int row) override; |
| 97 | 97 |
| 98 // Returns true if the menu is showing. | 98 // Returns true if the menu is showing. |
| 99 virtual bool IsShowing(); | 99 virtual bool IsShowing(); |
| 100 | 100 |
| 101 // Shows the menu at the specified location. Coordinates are in screen | 101 // Shows the menu at the specified location. Coordinates are in screen |
| 102 // coordinates. max_width gives the max width the view should be. | 102 // coordinates. max_width gives the max width the view should be. |
| 103 void ShowAt(Widget* parent, const gfx::Rect& bounds, bool do_capture); | 103 void ShowAt(Widget* parent, |
| 104 const gfx::Rect& bounds, |
| 105 bool do_capture, |
| 106 bool cancel_active_touches); |
| 104 | 107 |
| 105 // Resets the bounds of the submenu to |bounds|. | 108 // Resets the bounds of the submenu to |bounds|. |
| 106 void Reposition(const gfx::Rect& bounds); | 109 void Reposition(const gfx::Rect& bounds); |
| 107 | 110 |
| 108 // Closes the menu, destroying the host. | 111 // Closes the menu, destroying the host. |
| 109 void Close(); | 112 void Close(); |
| 110 | 113 |
| 111 // Hides the hosting window. | 114 // Hides the hosting window. |
| 112 // | 115 // |
| 113 // The hosting window is hidden first, then deleted (Close) when the menu is | 116 // The hosting window is hidden first, then deleted (Close) when the menu is |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 float roundoff_error_; | 224 float roundoff_error_; |
| 222 | 225 |
| 223 PrefixSelector prefix_selector_; | 226 PrefixSelector prefix_selector_; |
| 224 | 227 |
| 225 DISALLOW_COPY_AND_ASSIGN(SubmenuView); | 228 DISALLOW_COPY_AND_ASSIGN(SubmenuView); |
| 226 }; | 229 }; |
| 227 | 230 |
| 228 } // namespace views | 231 } // namespace views |
| 229 | 232 |
| 230 #endif // UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 233 #endif // UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
| OLD | NEW |