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

Side by Side Diff: chrome/browser/ui/toolbar/back_forward_menu_model.h

Issue 10824402: Convert ui::MenuModel to use gfx::Image instead of ImageSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another day, another rebase Created 8 years, 4 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
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 CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "chrome/browser/favicon/favicon_service.h" 14 #include "chrome/browser/favicon/favicon_service.h"
15 #include "ui/base/models/menu_model.h" 15 #include "ui/base/models/menu_model.h"
16 #include "webkit/glue/window_open_disposition.h" 16 #include "webkit/glue/window_open_disposition.h"
17 17
18 class Browser; 18 class Browser;
19 19
20 namespace content { 20 namespace content {
21 class NavigationEntry; 21 class NavigationEntry;
22 class WebContents; 22 class WebContents;
23 } 23 }
24 24
25 namespace gfx { 25 namespace gfx {
26 class ImageSkia; 26 class Image;
27 } 27 }
28 28
29 /////////////////////////////////////////////////////////////////////////////// 29 ///////////////////////////////////////////////////////////////////////////////
30 // 30 //
31 // BackForwardMenuModel 31 // BackForwardMenuModel
32 // 32 //
33 // Interface for the showing of the dropdown menu for the Back/Forward buttons. 33 // Interface for the showing of the dropdown menu for the Back/Forward buttons.
34 // Actual implementations are platform-specific. 34 // Actual implementations are platform-specific.
35 /////////////////////////////////////////////////////////////////////////////// 35 ///////////////////////////////////////////////////////////////////////////////
36 class BackForwardMenuModel : public ui::MenuModel { 36 class BackForwardMenuModel : public ui::MenuModel {
(...skipping 16 matching lines...) Expand all
53 // out the total number of items to show. 53 // out the total number of items to show.
54 virtual int GetItemCount() const OVERRIDE; 54 virtual int GetItemCount() const OVERRIDE;
55 virtual ItemType GetTypeAt(int index) const OVERRIDE; 55 virtual ItemType GetTypeAt(int index) const OVERRIDE;
56 virtual int GetCommandIdAt(int index) const OVERRIDE; 56 virtual int GetCommandIdAt(int index) const OVERRIDE;
57 virtual string16 GetLabelAt(int index) const OVERRIDE; 57 virtual string16 GetLabelAt(int index) const OVERRIDE;
58 virtual bool IsItemDynamicAt(int index) const OVERRIDE; 58 virtual bool IsItemDynamicAt(int index) const OVERRIDE;
59 virtual bool GetAcceleratorAt(int index, 59 virtual bool GetAcceleratorAt(int index,
60 ui::Accelerator* accelerator) const OVERRIDE; 60 ui::Accelerator* accelerator) const OVERRIDE;
61 virtual bool IsItemCheckedAt(int index) const OVERRIDE; 61 virtual bool IsItemCheckedAt(int index) const OVERRIDE;
62 virtual int GetGroupIdAt(int index) const OVERRIDE; 62 virtual int GetGroupIdAt(int index) const OVERRIDE;
63 virtual bool GetIconAt(int index, gfx::ImageSkia* icon) OVERRIDE; 63 virtual bool GetIconAt(int index, gfx::Image* icon) OVERRIDE;
64 virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt( 64 virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(
65 int index) const OVERRIDE; 65 int index) const OVERRIDE;
66 virtual bool IsEnabledAt(int index) const OVERRIDE; 66 virtual bool IsEnabledAt(int index) const OVERRIDE;
67 virtual MenuModel* GetSubmenuModelAt(int index) const OVERRIDE; 67 virtual MenuModel* GetSubmenuModelAt(int index) const OVERRIDE;
68 virtual void HighlightChangedTo(int index) OVERRIDE; 68 virtual void HighlightChangedTo(int index) OVERRIDE;
69 virtual void ActivatedAt(int index) OVERRIDE; 69 virtual void ActivatedAt(int index) OVERRIDE;
70 virtual void ActivatedAt(int index, int event_flags) OVERRIDE; 70 virtual void ActivatedAt(int index, int event_flags) OVERRIDE;
71 virtual void MenuWillShow() OVERRIDE; 71 virtual void MenuWillShow() OVERRIDE;
72 72
73 // Is the item at |index| a separator? 73 // Is the item at |index| a separator?
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // Used for loading favicons from history. 198 // Used for loading favicons from history.
199 CancelableRequestConsumerTSimple<int> load_consumer_; 199 CancelableRequestConsumerTSimple<int> load_consumer_;
200 200
201 // Used for receiving notifications when an icon is changed. 201 // Used for receiving notifications when an icon is changed.
202 ui::MenuModelDelegate* menu_model_delegate_; 202 ui::MenuModelDelegate* menu_model_delegate_;
203 203
204 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel); 204 DISALLOW_COPY_AND_ASSIGN(BackForwardMenuModel);
205 }; 205 };
206 206
207 #endif // CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_ 207 #endif // CHROME_BROWSER_UI_TOOLBAR_BACK_FORWARD_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/action_box_menu_model.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698