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

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

Issue 118001: Renames BackForwardMenuModelWin to BackForwardMenuModelViews.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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) 2006-2009 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/back_forward_menu_model_win.h" 5 #include "chrome/browser/back_forward_menu_model_views.h"
6 6
7 #include "chrome/browser/browser.h" 7 #include "chrome/browser/browser.h"
8 #include "chrome/browser/metrics/user_metrics.h" 8 #include "chrome/browser/metrics/user_metrics.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 10
11 // static 11 // static
12 BackForwardMenuModel* BackForwardMenuModel::Create(Browser* browser, 12 BackForwardMenuModel* BackForwardMenuModel::Create(Browser* browser,
13 ModelType model_type) { 13 ModelType model_type) {
14 return new BackForwardMenuModelWin(browser, model_type); 14 return new BackForwardMenuModelViews(browser, model_type);
15 } 15 }
16 16
17 BackForwardMenuModelWin::BackForwardMenuModelWin(Browser* browser, 17 BackForwardMenuModelViews::BackForwardMenuModelViews(Browser* browser,
18 ModelType model_type) { 18 ModelType model_type) {
19 browser_ = browser; 19 browser_ = browser;
20 model_type_ = model_type; 20 model_type_ = model_type;
21 } 21 }
22 22
23 std::wstring BackForwardMenuModelWin::GetLabel(int menu_id) const { 23 std::wstring BackForwardMenuModelViews::GetLabel(int menu_id) const {
24 return GetItemLabel(menu_id); 24 return GetItemLabel(menu_id);
25 } 25 }
26 26
27 const SkBitmap& BackForwardMenuModelWin::GetIcon(int menu_id) const { 27 const SkBitmap& BackForwardMenuModelViews::GetIcon(int menu_id) const {
28 // Return NULL if the item doesn't have an icon 28 // Return NULL if the item doesn't have an icon
29 if (!ItemHasIcon(menu_id)) 29 if (!ItemHasIcon(menu_id))
30 return GetEmptyIcon(); 30 return GetEmptyIcon();
31 31
32 return GetItemIcon(menu_id); 32 return GetItemIcon(menu_id);
33 } 33 }
34 34
35 bool BackForwardMenuModelWin::IsItemSeparator(int menu_id) const { 35 bool BackForwardMenuModelViews::IsItemSeparator(int menu_id) const {
36 return IsSeparator(menu_id); 36 return IsSeparator(menu_id);
37 } 37 }
38 38
39 bool BackForwardMenuModelWin::HasIcon(int menu_id) const { 39 bool BackForwardMenuModelViews::HasIcon(int menu_id) const {
40 return ItemHasIcon(menu_id); 40 return ItemHasIcon(menu_id);
41 } 41 }
42 42
43 bool BackForwardMenuModelWin::SupportsCommand(int menu_id) const { 43 bool BackForwardMenuModelViews::SupportsCommand(int menu_id) const {
44 return ItemHasCommand(menu_id); 44 return ItemHasCommand(menu_id);
45 } 45 }
46 46
47 bool BackForwardMenuModelWin::IsCommandEnabled(int menu_id) const { 47 bool BackForwardMenuModelViews::IsCommandEnabled(int menu_id) const {
48 return ItemHasCommand(menu_id); 48 return ItemHasCommand(menu_id);
49 } 49 }
50 50
51 void BackForwardMenuModelWin::ExecuteCommand(int menu_id) { 51 void BackForwardMenuModelViews::ExecuteCommand(int menu_id) {
52 ExecuteCommandById(menu_id); 52 ExecuteCommandById(menu_id);
53 } 53 }
54 54
55 void BackForwardMenuModelWin::MenuWillShow() { 55 void BackForwardMenuModelViews::MenuWillShow() {
56 UserMetrics::RecordComputedAction(BuildActionName(L"Popup", -1), 56 UserMetrics::RecordComputedAction(BuildActionName(L"Popup", -1),
57 browser_->profile()); 57 browser_->profile());
58 } 58 }
59 59
60 int BackForwardMenuModelWin::GetItemCount() const { 60 int BackForwardMenuModelViews::GetItemCount() const {
61 return GetTotalItemCount(); 61 return GetTotalItemCount();
62 } 62 }
OLDNEW
« no previous file with comments | « chrome/browser/back_forward_menu_model_views.h ('k') | chrome/browser/back_forward_menu_model_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698