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

Side by Side Diff: chrome/browser/back_forward_menu_model_views.h

Issue 501168: Make back forward menu model a MenuModel.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_VIEWS_H_
6 #define CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_VIEWS_H_
7
8 #include "base/basictypes.h"
9
10 #include "chrome/browser/back_forward_menu_model.h"
11 #include "views/controls/menu/menu_2.h"
12
13 class SkBitmap;
14
15 namespace views {
16 class Widget;
17 }
18
19 class BackForwardMenuModelViews : public BackForwardMenuModel,
20 public menus::MenuModel {
21 public:
22 // Construct a BackForwardMenuModel. |frame| is used to locate the accelerator
23 // for the history item.
24 BackForwardMenuModelViews(Browser* browser,
25 ModelType model_type,
26 views::Widget* frame);
27
28 // Overridden from menus::MenuModel:
29 virtual bool HasIcons() const;
30 virtual int GetItemCount() const;
31 virtual ItemType GetTypeAt(int index) const;
32 virtual int GetCommandIdAt(int index) const;
33 virtual string16 GetLabelAt(int index) const;
34 virtual bool IsLabelDynamicAt(int index) const;
35 virtual bool GetAcceleratorAt(int index,
36 menus::Accelerator* accelerator) const;
37 virtual bool IsItemCheckedAt(int index) const;
38 virtual int GetGroupIdAt(int index) const;
39 virtual bool GetIconAt(int index, SkBitmap* icon) const;
40 virtual bool IsEnabledAt(int index) const;
41 virtual menus::MenuModel* GetSubmenuModelAt(int index) const;
42 virtual void HighlightChangedTo(int index);
43 virtual void ActivatedAt(int index);
44 virtual void MenuWillShow();
45
46 private:
47 // The frame we ask about accelerator info.
48 views::Widget* frame_;
49
50 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModelViews);
51 };
52
53 #endif // CHROME_BROWSER_BACK_FORWARD_MENU_MODEL_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698