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

Side by Side Diff: chrome/browser/ui/webui/options/language_options_handler_common.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" 9 #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h"
10 #include "chrome/browser/ui/webui/options/options_ui.h" 10 #include "chrome/browser/ui/webui/options/options_ui.h"
11 11
12 namespace base { 12 namespace base {
13 class DictionaryValue; 13 class DictionaryValue;
14 class ListValue; 14 class ListValue;
15 } 15 }
16 16
17 namespace options { 17 namespace options {
18 18
19 // The base class for language options page UI handlers. This class has code 19 // The base class for language options page UI handlers. This class has code
20 // common to the Chrome OS and non-Chrome OS implementation of the handler. 20 // common to the Chrome OS and non-Chrome OS implementation of the handler.
21 class LanguageOptionsHandlerCommon 21 class LanguageOptionsHandlerCommon
22 : public OptionsPageUIHandler, 22 : public OptionsPageUIHandler,
23 public SpellcheckHunspellDictionary::Observer { 23 public SpellcheckHunspellDictionary::Observer {
24 public: 24 public:
25 LanguageOptionsHandlerCommon(); 25 LanguageOptionsHandlerCommon();
26 virtual ~LanguageOptionsHandlerCommon(); 26 ~LanguageOptionsHandlerCommon() override;
27 27
28 // OptionsPageUIHandler implementation. 28 // OptionsPageUIHandler implementation.
29 virtual void GetLocalizedValues( 29 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
30 base::DictionaryValue* localized_strings) override; 30 void Uninitialize() override;
31 virtual void Uninitialize() override;
32 31
33 // DOMMessageHandler implementation. 32 // DOMMessageHandler implementation.
34 virtual void RegisterMessages() override; 33 void RegisterMessages() override;
35 34
36 // SpellcheckHunspellDictionary::Observer implementation. 35 // SpellcheckHunspellDictionary::Observer implementation.
37 virtual void OnHunspellDictionaryInitialized() override; 36 void OnHunspellDictionaryInitialized() override;
38 virtual void OnHunspellDictionaryDownloadBegin() override; 37 void OnHunspellDictionaryDownloadBegin() override;
39 virtual void OnHunspellDictionaryDownloadSuccess() override; 38 void OnHunspellDictionaryDownloadSuccess() override;
40 virtual void OnHunspellDictionaryDownloadFailure() override; 39 void OnHunspellDictionaryDownloadFailure() override;
41 40
42 // The following static methods are public for ease of testing. 41 // The following static methods are public for ease of testing.
43 42
44 // Gets the set of language codes that can be used as UI language. 43 // Gets the set of language codes that can be used as UI language.
45 // The return value will look like: 44 // The return value will look like:
46 // {'en-US': true, 'fi': true, 'fr': true, ...} 45 // {'en-US': true, 'fi': true, 'fr': true, ...}
47 // 46 //
48 // Note that true in values does not mean anything. We just use the 47 // Note that true in values does not mean anything. We just use the
49 // dictionary as a set. 48 // dictionary as a set.
50 static base::DictionaryValue* GetUILanguageCodeSet(); 49 static base::DictionaryValue* GetUILanguageCodeSet();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 89
91 // The hunspell dictionary that is used for spellchecking. Might be null. 90 // The hunspell dictionary that is used for spellchecking. Might be null.
92 base::WeakPtr<SpellcheckHunspellDictionary> hunspell_dictionary_; 91 base::WeakPtr<SpellcheckHunspellDictionary> hunspell_dictionary_;
93 92
94 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandlerCommon); 93 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandlerCommon);
95 }; 94 };
96 95
97 } // namespace options 96 } // namespace options
98 97
99 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_ 98 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_LANGUAGE_OPTIONS_HANDLER_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698