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

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

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/browser/back_forward_menu_model_views.h ('k') | chrome/browser/browser_main.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) 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_views.h" 5 #include "chrome/browser/back_forward_menu_model_views.h"
6 6
7 #include "chrome/app/chrome_dll_resource.h" 7 #include "chrome/app/chrome_dll_resource.h"
8 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
9 #include "chrome/browser/metrics/user_metrics.h" 9 #include "chrome/browser/metrics/user_metrics.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 25 matching lines...) Expand all
36 int index) const { 36 int index) const {
37 if (IsSeparator(GetCommandIdAt(index))) 37 if (IsSeparator(GetCommandIdAt(index)))
38 return views::Menu2Model::TYPE_SEPARATOR; 38 return views::Menu2Model::TYPE_SEPARATOR;
39 return views::Menu2Model::TYPE_COMMAND; 39 return views::Menu2Model::TYPE_COMMAND;
40 } 40 }
41 41
42 int BackForwardMenuModelViews::GetCommandIdAt(int index) const { 42 int BackForwardMenuModelViews::GetCommandIdAt(int index) const {
43 return index + 1; 43 return index + 1;
44 } 44 }
45 45
46 std::wstring BackForwardMenuModelViews::GetLabelAt(int index) const { 46 string16 BackForwardMenuModelViews::GetLabelAt(int index) const {
47 return GetItemLabel(GetCommandIdAt(index)); 47 return GetItemLabel(GetCommandIdAt(index));
48 } 48 }
49 49
50 bool BackForwardMenuModelViews::IsLabelDynamicAt(int index) const { 50 bool BackForwardMenuModelViews::IsLabelDynamicAt(int index) const {
51 return false; 51 return false;
52 } 52 }
53 53
54 bool BackForwardMenuModelViews::GetAcceleratorAt( 54 bool BackForwardMenuModelViews::GetAcceleratorAt(
55 int index, 55 int index,
56 views::Accelerator* accelerator) const { 56 views::Accelerator* accelerator) const {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 void BackForwardMenuModelViews::ActivatedAt(int index) { 91 void BackForwardMenuModelViews::ActivatedAt(int index) {
92 ExecuteCommandById(GetCommandIdAt(index)); 92 ExecuteCommandById(GetCommandIdAt(index));
93 } 93 }
94 94
95 void BackForwardMenuModelViews::MenuWillShow() { 95 void BackForwardMenuModelViews::MenuWillShow() {
96 UserMetrics::RecordComputedAction(BuildActionName(L"Popup", -1), 96 UserMetrics::RecordComputedAction(BuildActionName(L"Popup", -1),
97 browser_->profile()); 97 browser_->profile());
98 } 98 }
OLDNEW
« no previous file with comments | « chrome/browser/back_forward_menu_model_views.h ('k') | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698