| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |