| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" |
| 10 |
| 11 namespace base { |
| 12 class ListValue; |
| 13 } |
| 14 |
| 15 namespace content { |
| 16 class WebUI; |
| 17 } |
| 18 |
| 19 class Profile; |
| 20 |
| 21 namespace settings { |
| 22 |
| 23 // Chrome "Languages" settings page UI handler. |
| 24 class LanguagesHandler : public SettingsPageUIHandler { |
| 25 public: |
| 26 explicit LanguagesHandler(content::WebUI* webui); |
| 27 ~LanguagesHandler() override; |
| 28 |
| 29 // SettingsPageUIHandler implementation. |
| 30 void RegisterMessages() override; |
| 31 |
| 32 private: |
| 33 // Changes the UI language, provided the user is allowed to do so. |
| 34 void HandleSetUILanguage(const base::ListValue* args); |
| 35 |
| 36 Profile* profile_; // Weak pointer. |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(LanguagesHandler); |
| 39 }; |
| 40 |
| 41 } // namespace settings |
| 42 |
| 43 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_LANGUAGES_HANDLER_H_ |
| OLD | NEW |