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

Side by Side Diff: components/translate/core/browser/options_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/translate/core/browser/options_menu_model.h" 5 #include "components/translate/core/browser/options_menu_model.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "components/translate/core/browser/translate_driver.h" 9 #include "components/translate/core/browser/translate_driver.h"
10 #include "components/translate/core/browser/translate_infobar_delegate.h" 10 #include "components/translate/core/browser/translate_infobar_delegate.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 !translate_infobar_delegate_->IsSiteBlacklisted()); 95 !translate_infobar_delegate_->IsSiteBlacklisted());
96 96
97 default: 97 default:
98 break; 98 break;
99 } 99 }
100 return true; 100 return true;
101 } 101 }
102 102
103 bool OptionsMenuModel::GetAcceleratorForCommandId( 103 bool OptionsMenuModel::GetAcceleratorForCommandId(
104 int command_id, 104 int command_id,
105 ui::Accelerator* accelerator) { 105 ui::Accelerator* accelerator) const {
106 return false; 106 return false;
107 } 107 }
108 108
109 void OptionsMenuModel::ExecuteCommand(int command_id, int event_flags) { 109 void OptionsMenuModel::ExecuteCommand(int command_id, int event_flags) {
110 switch (command_id) { 110 switch (command_id) {
111 case NEVER_TRANSLATE_LANGUAGE: 111 case NEVER_TRANSLATE_LANGUAGE:
112 translate_infobar_delegate_->ToggleTranslatableLanguageByPrefs(); 112 translate_infobar_delegate_->ToggleTranslatableLanguageByPrefs();
113 break; 113 break;
114 114
115 case NEVER_TRANSLATE_SITE: 115 case NEVER_TRANSLATE_SITE:
(...skipping 16 matching lines...) Expand all
132 break; 132 break;
133 } 133 }
134 134
135 default: 135 default:
136 NOTREACHED() << "Invalid command id from menu."; 136 NOTREACHED() << "Invalid command id from menu.";
137 break; 137 break;
138 } 138 }
139 } 139 }
140 140
141 } // namespace translate 141 } // namespace translate
OLDNEW
« no previous file with comments | « components/translate/core/browser/options_menu_model.h ('k') | content/shell/browser/shell_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698