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

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

Issue 150171: Convert menu strings to UTF16, fix some views-GTK build errors. (Closed)
Patch Set: Created 11 years, 5 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 | « chrome/chrome.gyp ('k') | views/controls/menu/native_menu_gtk.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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef CONTROLS_MENU_VIEWS_MENU_2_H_ 5 #ifndef CONTROLS_MENU_VIEWS_MENU_2_H_
6 #define CONTROLS_MENU_VIEWS_MENU_2_H_ 6 #define CONTROLS_MENU_VIEWS_MENU_2_H_
7 7
8 #include <string>
9
10 #include "base/gfx/native_widget_types.h" 8 #include "base/gfx/native_widget_types.h"
9 #include "base/string16.h"
11 10
12 namespace gfx { 11 namespace gfx {
13 class Point; 12 class Point;
14 } 13 }
15 class SkBitmap; 14 class SkBitmap;
16 15
17 namespace views { 16 namespace views {
18 17
19 class Accelerator; 18 class Accelerator;
20 class Menu2; 19 class Menu2;
(...skipping 30 matching lines...) Expand all
51 // Returns the number of items in the menu. 50 // Returns the number of items in the menu.
52 virtual int GetItemCount() const = 0; 51 virtual int GetItemCount() const = 0;
53 52
54 // Returns the type of item at the specified index. 53 // Returns the type of item at the specified index.
55 virtual ItemType GetTypeAt(int index) const = 0; 54 virtual ItemType GetTypeAt(int index) const = 0;
56 55
57 // Returns the command id of the item at the specified index. 56 // Returns the command id of the item at the specified index.
58 virtual int GetCommandIdAt(int index) const = 0; 57 virtual int GetCommandIdAt(int index) const = 0;
59 58
60 // Returns the label of the item at the specified index. 59 // Returns the label of the item at the specified index.
61 virtual std::wstring GetLabelAt(int index) const = 0; 60 virtual string16 GetLabelAt(int index) const = 0;
62 61
63 // Returns true if the label at the specified index can change over the course 62 // Returns true if the label at the specified index can change over the course
64 // of the menu's lifetime. If this function returns true, the label of the 63 // of the menu's lifetime. If this function returns true, the label of the
65 // menu item will be updated each time the menu is shown. 64 // menu item will be updated each time the menu is shown.
66 virtual bool IsLabelDynamicAt(int index) const = 0; 65 virtual bool IsLabelDynamicAt(int index) const = 0;
67 66
68 // Gets the acclerator information for the specified index, returning true if 67 // Gets the acclerator information for the specified index, returning true if
69 // there is a shortcut accelerator for the item, false otherwise. 68 // there is a shortcut accelerator for the item, false otherwise.
70 virtual bool GetAcceleratorAt(int index, 69 virtual bool GetAcceleratorAt(int index,
71 views::Accelerator* accelerator) const = 0; 70 views::Accelerator* accelerator) const = 0;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 143
145 // The object that actually implements the menu. 144 // The object that actually implements the menu.
146 MenuWrapper* wrapper_; 145 MenuWrapper* wrapper_;
147 146
148 DISALLOW_COPY_AND_ASSIGN(Menu2); 147 DISALLOW_COPY_AND_ASSIGN(Menu2);
149 }; 148 };
150 149
151 } // namespace views 150 } // namespace views
152 151
153 #endif // CONTROLS_MENU_VIEWS_MENU_2_H_ 152 #endif // CONTROLS_MENU_VIEWS_MENU_2_H_
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | views/controls/menu/native_menu_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698