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

Side by Side Diff: chrome/browser/ui/webui/settings/languages_handler.h

Issue 1988463002: MD Settings: Convert C++ handlers to be JavaScript-lifecycle aware. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_SETTINGS_LANGUAGES_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" 9 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
10 10
(...skipping 10 matching lines...) Expand all
21 namespace settings { 21 namespace settings {
22 22
23 // Chrome "Languages" settings page UI handler. 23 // Chrome "Languages" settings page UI handler.
24 class LanguagesHandler : public SettingsPageUIHandler { 24 class LanguagesHandler : public SettingsPageUIHandler {
25 public: 25 public:
26 explicit LanguagesHandler(content::WebUI* webui); 26 explicit LanguagesHandler(content::WebUI* webui);
27 ~LanguagesHandler() override; 27 ~LanguagesHandler() override;
28 28
29 // SettingsPageUIHandler implementation. 29 // SettingsPageUIHandler implementation.
30 void RegisterMessages() override; 30 void RegisterMessages() override;
31 void OnJavascriptAllowed() override {}
32 void OnJavascriptDisallowed() override {}
31 33
32 private: 34 private:
33 // Changes the UI language, provided the user is allowed to do so. 35 // Changes the UI language, provided the user is allowed to do so.
34 void HandleSetUILanguage(const base::ListValue* args); 36 void HandleSetUILanguage(const base::ListValue* args);
35 37
36 // Restarts Chrome to apply a UI language change. 38 // Restarts Chrome to apply a UI language change.
37 void HandleRestart(const base::ListValue* args); 39 void HandleRestart(const base::ListValue* args);
38 40
39 Profile* profile_; // Weak pointer. 41 Profile* profile_; // Weak pointer.
40 42
41 DISALLOW_COPY_AND_ASSIGN(LanguagesHandler); 43 DISALLOW_COPY_AND_ASSIGN(LanguagesHandler);
42 }; 44 };
43 45
44 } // namespace settings 46 } // namespace settings
45 47
46 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_ 48 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/downloads_handler.h ('k') | chrome/browser/ui/webui/settings/native_certificates_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698