OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BROWSER_LIFETIME_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_BROWSER_LIFETIME_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_BROWSER_LIFETIME_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_BROWSER_LIFETIME_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 |
11 namespace base { | 11 namespace base { |
12 class ListValue; | 12 class ListValue; |
13 } | 13 } |
14 | 14 |
15 namespace content { | |
16 class WebUIDataSource; | |
17 } | |
18 | |
19 namespace settings { | 15 namespace settings { |
20 | 16 |
21 class BrowserLifetimeHandler : public SettingsPageUIHandler { | 17 class BrowserLifetimeHandler : public SettingsPageUIHandler { |
22 public: | 18 public: |
23 BrowserLifetimeHandler(); | 19 BrowserLifetimeHandler(); |
24 ~BrowserLifetimeHandler() override; | 20 ~BrowserLifetimeHandler() override; |
25 | 21 |
26 // SettingsPageUIHandler: | 22 // SettingsPageUIHandler: |
27 void RegisterMessages() override; | 23 void RegisterMessages() override; |
28 void OnJavascriptAllowed() override {} | 24 void OnJavascriptAllowed() override {} |
29 void OnJavascriptDisallowed() override {} | 25 void OnJavascriptDisallowed() override {} |
30 | 26 |
31 private: | 27 private: |
32 void HandleRestart(const base::ListValue* /*args*/); | 28 void HandleRestart(const base::ListValue* /*args*/); |
33 void HandleRelaunch(const base::ListValue* /*args*/); | 29 void HandleRelaunch(const base::ListValue* /*args*/); |
34 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
35 void HandleSignOutAndRestart(const base::ListValue* /*args*/); | 31 void HandleSignOutAndRestart(const base::ListValue* /*args*/); |
36 void HandleFactoryReset(const base::ListValue* /*args*/); | 32 void HandleFactoryReset(const base::ListValue* /*args*/); |
37 #endif // defined(OS_CHROMEOS) | 33 #endif // defined(OS_CHROMEOS) |
38 | 34 |
39 DISALLOW_COPY_AND_ASSIGN(BrowserLifetimeHandler); | 35 DISALLOW_COPY_AND_ASSIGN(BrowserLifetimeHandler); |
40 }; | 36 }; |
41 | 37 |
42 } // namespace settings | 38 } // namespace settings |
43 | 39 |
44 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_BROWSER_LIFETIME_HANDLER_H_ | 40 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_BROWSER_LIFETIME_HANDLER_H_ |
OLD | NEW |