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

Side by Side Diff: views/controls/menu/native_menu_win.h

Issue 3533001: Add SetMinimumWidth to Menu2 for chromeos. Removed LanguageSwitchModel::GetFirstLevelMenuWidth (Closed)
Patch Set: updated comment Created 10 years, 2 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
« no previous file with comments | « views/controls/menu/native_menu_gtk.cc ('k') | views/controls/menu/native_menu_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_NATIVE_MENU_WIN_H_ 5 #ifndef VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_
6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_ 6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 // Overridden from MenuWrapper: 27 // Overridden from MenuWrapper:
28 virtual void RunMenuAt(const gfx::Point& point, int alignment); 28 virtual void RunMenuAt(const gfx::Point& point, int alignment);
29 virtual void CancelMenu(); 29 virtual void CancelMenu();
30 virtual void Rebuild(); 30 virtual void Rebuild();
31 virtual void UpdateStates(); 31 virtual void UpdateStates();
32 virtual gfx::NativeMenu GetNativeMenu() const; 32 virtual gfx::NativeMenu GetNativeMenu() const;
33 virtual MenuAction GetMenuAction() const; 33 virtual MenuAction GetMenuAction() const;
34 virtual void AddMenuListener(MenuListener* listener); 34 virtual void AddMenuListener(MenuListener* listener);
35 virtual void RemoveMenuListener(MenuListener* listener); 35 virtual void RemoveMenuListener(MenuListener* listener);
36 virtual void SetMinimumWidth(int width);
36 37
37 private: 38 private:
38 // IMPORTANT: Note about indices. 39 // IMPORTANT: Note about indices.
39 // Functions in this class deal in two index spaces: 40 // Functions in this class deal in two index spaces:
40 // 1. menu_index - the index of an item within the actual Windows 41 // 1. menu_index - the index of an item within the actual Windows
41 // native menu. 42 // native menu.
42 // 2. model_index - the index of the item within our model. 43 // 2. model_index - the index of the item within our model.
43 // These two are most often but not always the same value! The 44 // These two are most often but not always the same value! The
44 // notable exception is when this object is used to wrap the 45 // notable exception is when this object is used to wrap the
45 // Windows System Menu. In this instance, the model indices start 46 // Windows System Menu. In this instance, the model indices start
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // Overridden from SimpleMenuModel: 157 // Overridden from SimpleMenuModel:
157 virtual int FlipIndex(int index) const { return GetItemCount() - index - 1; } 158 virtual int FlipIndex(int index) const { return GetItemCount() - index - 1; }
158 159
159 private: 160 private:
160 DISALLOW_COPY_AND_ASSIGN(SystemMenuModel); 161 DISALLOW_COPY_AND_ASSIGN(SystemMenuModel);
161 }; 162 };
162 163
163 } // namespace views 164 } // namespace views
164 165
165 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_ 166 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_
OLDNEW
« no previous file with comments | « views/controls/menu/native_menu_gtk.cc ('k') | views/controls/menu/native_menu_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698