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

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

Issue 117983002: Prefix string16 with base:: in ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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
« no previous file with comments | « ui/views/controls/menu/menu_win.cc ('k') | ui/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) 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_NATIVE_MENU_WIN_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_
6 #define UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_ 6 #define UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // Sets the state of the item at the specified index. 68 // Sets the state of the item at the specified index.
69 void SetMenuItemState(int menu_index, 69 void SetMenuItemState(int menu_index,
70 bool enabled, 70 bool enabled,
71 bool checked, 71 bool checked,
72 bool is_default); 72 bool is_default);
73 73
74 // Sets the label of the item at the specified index. 74 // Sets the label of the item at the specified index.
75 void SetMenuItemLabel(int menu_index, 75 void SetMenuItemLabel(int menu_index,
76 int model_index, 76 int model_index,
77 const string16& label); 77 const base::string16& label);
78 78
79 // Updates the local data structure with the correctly formatted version of 79 // Updates the local data structure with the correctly formatted version of
80 // |label| at the specified model_index, and adds string data to |mii| if 80 // |label| at the specified model_index, and adds string data to |mii| if
81 // the menu is not owner-draw. That's a mouthful. This function exists because 81 // the menu is not owner-draw. That's a mouthful. This function exists because
82 // of the peculiarities of the Windows menu API. 82 // of the peculiarities of the Windows menu API.
83 void UpdateMenuItemInfoForString(MENUITEMINFO* mii, 83 void UpdateMenuItemInfoForString(MENUITEMINFO* mii,
84 int model_index, 84 int model_index,
85 const string16& label); 85 const base::string16& label);
86 86
87 // Returns the alignment flags to be passed to TrackPopupMenuEx, based on the 87 // Returns the alignment flags to be passed to TrackPopupMenuEx, based on the
88 // supplied alignment and the UI text direction. 88 // supplied alignment and the UI text direction.
89 UINT GetAlignmentFlags(int alignment) const; 89 UINT GetAlignmentFlags(int alignment) const;
90 90
91 // Resets the native menu stored in |menu_| by destroying any old menu then 91 // Resets the native menu stored in |menu_| by destroying any old menu then
92 // creating a new empty one. 92 // creating a new empty one.
93 void ResetNativeMenu(); 93 void ResetNativeMenu();
94 94
95 // Creates the host window that receives notifications from the menu. 95 // Creates the host window that receives notifications from the menu.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // has a menu open, because our hook function that receives keyboard 160 // has a menu open, because our hook function that receives keyboard
161 // events doesn't have a mechanism to get a user data pointer. 161 // events doesn't have a mechanism to get a user data pointer.
162 static NativeMenuWin* open_native_menu_win_; 162 static NativeMenuWin* open_native_menu_win_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(NativeMenuWin); 164 DISALLOW_COPY_AND_ASSIGN(NativeMenuWin);
165 }; 165 };
166 166
167 } // namespace views 167 } // namespace views
168 168
169 #endif // UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_ 169 #endif // UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_win.cc ('k') | ui/views/controls/menu/native_menu_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698