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

Side by Side Diff: chrome/browser/translate/languages_menu_model.h

Issue 8614003: Add OVERRIDE to chrome/browser/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_TRANSLATE_LANGUAGES_MENU_MODEL_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_LANGUAGES_MENU_MODEL_H_
6 #define CHROME_BROWSER_TRANSLATE_LANGUAGES_MENU_MODEL_H_ 6 #define CHROME_BROWSER_TRANSLATE_LANGUAGES_MENU_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/base/models/simple_menu_model.h" 9 #include "ui/base/models/simple_menu_model.h"
10 10
11 class TranslateInfoBarDelegate; 11 class TranslateInfoBarDelegate;
12 12
13 // A menu model that builds the contents of the language menus in the translate 13 // A menu model that builds the contents of the language menus in the translate
14 // infobar. This menu has only one level (no submenus). 14 // infobar. This menu has only one level (no submenus).
15 class LanguagesMenuModel : public ui::SimpleMenuModel, 15 class LanguagesMenuModel : public ui::SimpleMenuModel,
16 public ui::SimpleMenuModel::Delegate { 16 public ui::SimpleMenuModel::Delegate {
17 public: 17 public:
18 enum LanguageType { 18 enum LanguageType {
19 ORIGINAL, 19 ORIGINAL,
20 TARGET 20 TARGET
21 }; 21 };
22 LanguagesMenuModel(TranslateInfoBarDelegate* translate_delegate, 22 LanguagesMenuModel(TranslateInfoBarDelegate* translate_delegate,
23 LanguageType language_type); 23 LanguageType language_type);
24 virtual ~LanguagesMenuModel(); 24 virtual ~LanguagesMenuModel();
25 25
26 // ui::SimpleMenuModel::Delegate implementation: 26 // ui::SimpleMenuModel::Delegate implementation:
27 virtual bool IsCommandIdChecked(int command_id) const; 27 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
28 virtual bool IsCommandIdEnabled(int command_id) const; 28 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
29 virtual bool GetAcceleratorForCommandId(int command_id, 29 virtual bool GetAcceleratorForCommandId(
30 ui::Accelerator* accelerator); 30 int command_id,
31 virtual void ExecuteCommand(int command_id); 31 ui::Accelerator* accelerator) OVERRIDE;
32 virtual void ExecuteCommand(int command_id) OVERRIDE;
32 33
33 private: 34 private:
34 TranslateInfoBarDelegate* translate_infobar_delegate_; 35 TranslateInfoBarDelegate* translate_infobar_delegate_;
35 LanguageType language_type_; 36 LanguageType language_type_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(LanguagesMenuModel); 38 DISALLOW_COPY_AND_ASSIGN(LanguagesMenuModel);
38 }; 39 };
39 40
40 #endif // CHROME_BROWSER_TRANSLATE_LANGUAGES_MENU_MODEL_H_ 41 #endif // CHROME_BROWSER_TRANSLATE_LANGUAGES_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_factory.h ('k') | chrome/browser/translate/options_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698