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

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

Issue 2861873002: Align the base of the shelf's context menu to the top edge of the shelf. (Closed)
Patch Set: Align the base of the shelf's context menu to the top edge of the shelf. Created 3 years, 7 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
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_RUNNER_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // The menu should behave like a Windows native Combobox dropdow menu. 79 // The menu should behave like a Windows native Combobox dropdow menu.
80 // This behavior includes accepting the pending item and closing on F4. 80 // This behavior includes accepting the pending item and closing on F4.
81 COMBOBOX = 1 << 4, 81 COMBOBOX = 1 << 4,
82 82
83 // A child view is performing a drag-and-drop operation, so the menu should 83 // A child view is performing a drag-and-drop operation, so the menu should
84 // stay open (even if it doesn't receive drag updated events). In this case, 84 // stay open (even if it doesn't receive drag updated events). In this case,
85 // the caller is responsible for closing the menu upon completion of the 85 // the caller is responsible for closing the menu upon completion of the
86 // drag-and-drop. 86 // drag-and-drop.
87 NESTED_DRAG = 1 << 5, 87 NESTED_DRAG = 1 << 5,
88
89 // The context menu of the shelf item.
90 SHELF_CONTEXT_MENU = 1 << 6,
sadrul 2017/05/10 01:25:40 Can you call this FIXED_ANCHOR, or something like
88 }; 91 };
89 92
90 // Creates a new MenuRunner, which may use a native menu if available. 93 // Creates a new MenuRunner, which may use a native menu if available.
91 // |run_types| is a bitmask of RunTypes. If provided, 94 // |run_types| is a bitmask of RunTypes. If provided,
92 // |on_menu_closed_callback| is invoked when the menu is closed. 95 // |on_menu_closed_callback| is invoked when the menu is closed.
93 // Note that with a native menu (e.g. on Mac), the ASYNC flag in |run_types| 96 // Note that with a native menu (e.g. on Mac), the ASYNC flag in |run_types|
94 // may be ignored. See http://crbug.com/682544. 97 // may be ignored. See http://crbug.com/682544.
95 MenuRunner(ui::MenuModel* menu_model, 98 MenuRunner(ui::MenuModel* menu_model,
96 int32_t run_types, 99 int32_t run_types,
97 const base::Closure& on_menu_closed_callback = base::Closure()); 100 const base::Closure& on_menu_closed_callback = base::Closure());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 157
155 protected: 158 protected:
156 DisplayChangeListener() {} 159 DisplayChangeListener() {}
157 }; 160 };
158 161
159 } // namespace internal 162 } // namespace internal
160 163
161 } // namespace views 164 } // namespace views
162 165
163 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 166 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698