OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
6 #define VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 6 #define VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 // the windows used to display all descendants. | 399 // the windows used to display all descendants. |
400 void DestroyAllMenuHosts(); | 400 void DestroyAllMenuHosts(); |
401 | 401 |
402 // Returns the accelerator text. | 402 // Returns the accelerator text. |
403 string16 GetAcceleratorText(); | 403 string16 GetAcceleratorText(); |
404 | 404 |
405 // Returns the various margins. | 405 // Returns the various margins. |
406 int GetTopMargin(); | 406 int GetTopMargin(); |
407 int GetBottomMargin(); | 407 int GetBottomMargin(); |
408 | 408 |
409 // Returns the preferred width (and padding) of any children. | 409 // Returns the preferred size (and padding) of any children. |
410 int GetChildPreferredWidth(); | 410 gfx::Size GetChildPreferredSize(); |
411 | 411 |
412 // Calculates the preferred size. | 412 // Calculates the preferred size. |
413 gfx::Size CalculatePreferredSize(); | 413 gfx::Size CalculatePreferredSize(); |
414 | 414 |
415 // Used by MenuController to cache the menu position in use by the | 415 // Used by MenuController to cache the menu position in use by the |
416 // active menu. | 416 // active menu. |
417 MenuPosition actual_menu_position() const { return actual_menu_position_; } | 417 MenuPosition actual_menu_position() const { return actual_menu_position_; } |
418 void set_actual_menu_position(MenuPosition actual_menu_position) { | 418 void set_actual_menu_position(MenuPosition actual_menu_position) { |
419 actual_menu_position_ = actual_menu_position; | 419 actual_menu_position_ = actual_menu_position; |
420 } | 420 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 // position of the menu being shown. | 493 // position of the menu being shown. |
494 MenuPosition requested_menu_position_; | 494 MenuPosition requested_menu_position_; |
495 MenuPosition actual_menu_position_; | 495 MenuPosition actual_menu_position_; |
496 | 496 |
497 DISALLOW_COPY_AND_ASSIGN(MenuItemView); | 497 DISALLOW_COPY_AND_ASSIGN(MenuItemView); |
498 }; | 498 }; |
499 | 499 |
500 } // namespace views | 500 } // namespace views |
501 | 501 |
502 #endif // VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 502 #endif // VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
OLD | NEW |