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

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

Issue 2573643005: Language settings: Fix Restart and Remove buttons shown at wrong times (Closed)
Patch Set: feedback Created 4 years 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 14 matching lines...) Expand all
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 {} 31 void OnJavascriptAllowed() override {}
32 void OnJavascriptDisallowed() override {} 32 void OnJavascriptDisallowed() override {}
33 33
34 private: 34 private:
35 // Changes the UI language, provided the user is allowed to do so. 35 // Returns the prospective UI language. May not match the actual UI language,
36 void HandleSetUILanguage(const base::ListValue* args); 36 // depending on the user's permissions and whether the language is substituted
37 // for another locale.
38 void HandleGetProspectiveUILanguage(const base::ListValue* args);
39
40 // Changes the preferred UI language, provided the user is allowed to do so.
41 // The actual UI language will not change until the next restart.
42 void HandleSetProspectiveUILanguage(const base::ListValue* args);
37 43
38 Profile* profile_; // Weak pointer. 44 Profile* profile_; // Weak pointer.
39 45
40 DISALLOW_COPY_AND_ASSIGN(LanguagesHandler); 46 DISALLOW_COPY_AND_ASSIGN(LanguagesHandler);
41 }; 47 };
42 48
43 } // namespace settings 49 } // namespace settings
44 50
45 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_ 51 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698