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

Side by Side Diff: ui/views/controls/menu/menu_item_view.h

Issue 10917102: Context menus should appear above the touch point if invoked by long press. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_MENU_ITEM_VIEW_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 CHECKBOX, 84 CHECKBOX,
85 RADIO, 85 RADIO,
86 SEPARATOR, 86 SEPARATOR,
87 EMPTY 87 EMPTY
88 }; 88 };
89 89
90 // Where the menu should be anchored to for non-RTL languages. The 90 // Where the menu should be anchored to for non-RTL languages. The
91 // opposite position will be used if base::i18n:IsRTL() is true. 91 // opposite position will be used if base::i18n:IsRTL() is true.
92 enum AnchorPosition { 92 enum AnchorPosition {
93 TOPLEFT, 93 TOPLEFT,
94 TOPRIGHT 94 TOPRIGHT,
95 BOTTOMCENTER
95 }; 96 };
96 97
97 // Where the menu should be drawn, above or below the bounds (when 98 // Where the menu should be drawn, above or below the bounds (when
98 // the bounds is non-empty). POSITION_BEST_FIT (default) positions 99 // the bounds is non-empty). POSITION_BEST_FIT (default) positions
99 // the menu below the bounds unless the menu does not fit on the 100 // the menu below the bounds unless the menu does not fit on the
100 // screen and the re is more space above. 101 // screen and the re is more space above.
101 enum MenuPosition { 102 enum MenuPosition {
102 POSITION_BEST_FIT, 103 POSITION_BEST_FIT,
103 POSITION_ABOVE_BOUNDS, 104 POSITION_ABOVE_BOUNDS,
104 POSITION_BELOW_BOUNDS 105 POSITION_BELOW_BOUNDS
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 // If set to false, the right margin will be removed for menu lines 499 // If set to false, the right margin will be removed for menu lines
499 // containing other elements. 500 // containing other elements.
500 bool use_right_margin_; 501 bool use_right_margin_;
501 502
502 DISALLOW_COPY_AND_ASSIGN(MenuItemView); 503 DISALLOW_COPY_AND_ASSIGN(MenuItemView);
503 }; 504 };
504 505
505 } // namespace views 506 } // namespace views
506 507
507 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 508 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698