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

Side by Side Diff: chrome/browser/views/tab_contents/render_view_context_menu_win.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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_WIN_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_WIN_H_
6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_WIN_H_ 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_WIN_H_
7 7
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/scoped_vector.h" 9 #include "base/scoped_vector.h"
10 #include "chrome/browser/tab_contents/render_view_context_menu.h" 10 #include "chrome/browser/tab_contents/render_view_context_menu.h"
(...skipping 18 matching lines...) Expand all
29 virtual void ExecuteCommand(int command_id); 29 virtual void ExecuteCommand(int command_id);
30 30
31 gfx::NativeMenu GetMenuHandle() const { 31 gfx::NativeMenu GetMenuHandle() const {
32 return (menu_.get() ? menu_->GetNativeMenu() : NULL); 32 return (menu_.get() ? menu_->GetNativeMenu() : NULL);
33 } 33 }
34 34
35 protected: 35 protected:
36 // RenderViewContextMenu implementation -------------------------------------- 36 // RenderViewContextMenu implementation --------------------------------------
37 virtual void DoInit(); 37 virtual void DoInit();
38 virtual void AppendMenuItem(int id); 38 virtual void AppendMenuItem(int id);
39 virtual void AppendMenuItem(int id, const std::wstring& label); 39 virtual void AppendMenuItem(int id, const string16& label);
40 virtual void AppendRadioMenuItem(int id, const std::wstring& label); 40 virtual void AppendRadioMenuItem(int id, const string16& label);
41 virtual void AppendCheckboxMenuItem(int id, const std::wstring& label); 41 virtual void AppendCheckboxMenuItem(int id, const string16& label);
42 virtual void AppendSeparator(); 42 virtual void AppendSeparator();
43 virtual void StartSubMenu(int id, const std::wstring& label); 43 virtual void StartSubMenu(int id, const string16& label);
44 virtual void FinishSubMenu(); 44 virtual void FinishSubMenu();
45 45
46 private: 46 private:
47 // Gets the target model to append items to. This is either the main context 47 // Gets the target model to append items to. This is either the main context
48 // menu, or a submenu if we've descended into one. 48 // menu, or a submenu if we've descended into one.
49 views::SimpleMenuModel* GetTargetModel() const; 49 views::SimpleMenuModel* GetTargetModel() const;
50 50
51 // The current radio group for radio menu items. 51 // The current radio group for radio menu items.
52 int current_radio_group_id_; 52 int current_radio_group_id_;
53 53
54 // The context menu itself and its contents. 54 // The context menu itself and its contents.
55 scoped_ptr<views::SimpleMenuModel> menu_contents_; 55 scoped_ptr<views::SimpleMenuModel> menu_contents_;
56 scoped_ptr<views::Menu2> menu_; 56 scoped_ptr<views::Menu2> menu_;
57 // TODO(beng): This way of building submenus is kind of retarded, but it 57 // TODO(beng): This way of building submenus is kind of retarded, but it
58 // hasn't hurt us yet. It's just a bit awkward. 58 // hasn't hurt us yet. It's just a bit awkward.
59 views::SimpleMenuModel* sub_menu_contents_; 59 views::SimpleMenuModel* sub_menu_contents_;
60 // We own submenu models that we create, so we store them here. 60 // We own submenu models that we create, so we store them here.
61 ScopedVector<views::SimpleMenuModel> submenu_models_; 61 ScopedVector<views::SimpleMenuModel> submenu_models_;
62 }; 62 };
63 63
64 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_WIN_H_ 64 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/info_bubble.cc ('k') | chrome/browser/views/tab_contents/render_view_context_menu_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698