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/website_settings/permission_menu_model.cc

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. Created 4 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) 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 #include "chrome/browser/ui/website_settings/permission_menu_model.h" 5 #include "chrome/browser/ui/website_settings/permission_menu_model.h"
6 6
7 #include "chrome/grit/generated_resources.h" 7 #include "chrome/grit/generated_resources.h"
8 #include "components/content_settings/core/browser/plugins_field_trial.h" 8 #include "components/content_settings/core/browser/plugins_field_trial.h"
9 #include "content/public/common/origin_util.h" 9 #include "content/public/common/origin_util.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 return setting == command_id; 115 return setting == command_id;
116 } 116 }
117 117
118 bool PermissionMenuModel::IsCommandIdEnabled(int command_id) const { 118 bool PermissionMenuModel::IsCommandIdEnabled(int command_id) const {
119 return true; 119 return true;
120 } 120 }
121 121
122 bool PermissionMenuModel::GetAcceleratorForCommandId( 122 bool PermissionMenuModel::GetAcceleratorForCommandId(
123 int command_id, 123 int command_id,
124 ui::Accelerator* accelerator) { 124 ui::Accelerator* accelerator) const {
125 // Accelerators are not supported. 125 // Accelerators are not supported.
126 return false; 126 return false;
127 } 127 }
128 128
129 void PermissionMenuModel::ExecuteCommand(int command_id, int event_flags) { 129 void PermissionMenuModel::ExecuteCommand(int command_id, int event_flags) {
130 permission_.setting = static_cast<ContentSetting>(command_id); 130 permission_.setting = static_cast<ContentSetting>(command_id);
131 callback_.Run(permission_); 131 callback_.Run(permission_);
132 } 132 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/permission_menu_model.h ('k') | chrome/test/base/menu_model_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698