OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CHROMEOS_CHARGER_REPLACEMENT_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHARGER_REPLACEMENT_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHARGER_REPLACEMENT_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHARGER_REPLACEMENT_HANDLER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/public/browser/web_ui_message_handler.h" | 9 #include "content/public/browser/web_ui_message_handler.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 virtual ~ChargerReplacementHandler(); | 32 virtual ~ChargerReplacementHandler(); |
33 | 33 |
34 // Registers preferences. | 34 // Registers preferences. |
35 static void RegisterPrefs(PrefRegistrySimple* registry); | 35 static void RegisterPrefs(PrefRegistrySimple* registry); |
36 | 36 |
37 // Sets/Gets charger status pref. | 37 // Sets/Gets charger status pref. |
38 static SpringChargerStatus GetChargerStatusPref(); | 38 static SpringChargerStatus GetChargerStatusPref(); |
39 static void SetChargerStatusPref(SpringChargerStatus status); | 39 static void SetChargerStatusPref(SpringChargerStatus status); |
40 | 40 |
41 // WebUIMessageHandler overrides: | 41 // WebUIMessageHandler overrides: |
42 virtual void RegisterMessages() OVERRIDE; | 42 virtual void RegisterMessages() override; |
43 | 43 |
44 // Gets localized strings for web ui. | 44 // Gets localized strings for web ui. |
45 static void GetLocalizedValues(base::DictionaryValue* localized_strings); | 45 static void GetLocalizedValues(base::DictionaryValue* localized_strings); |
46 | 46 |
47 void set_charger_window(gfx::NativeWindow window) { | 47 void set_charger_window(gfx::NativeWindow window) { |
48 charger_window_ = window; | 48 charger_window_ = window; |
49 } | 49 } |
50 | 50 |
51 private: | 51 private: |
52 void ConfirmSafeCharger(const base::ListValue* args); | 52 void ConfirmSafeCharger(const base::ListValue* args); |
53 void ConfirmNotOrderNewCharger(const base::ListValue* args); | 53 void ConfirmNotOrderNewCharger(const base::ListValue* args); |
54 void ConfirmChargerOrderedOnline(const base::ListValue* args); | 54 void ConfirmChargerOrderedOnline(const base::ListValue* args); |
55 void ConfirmChargerOrderByPhone(const base::ListValue* args); | 55 void ConfirmChargerOrderByPhone(const base::ListValue* args); |
56 void ConfirmStillUseBadCharger(const base::ListValue* args); | 56 void ConfirmStillUseBadCharger(const base::ListValue* args); |
57 void ShowLink(const base::ListValue* args); | 57 void ShowLink(const base::ListValue* args); |
58 | 58 |
59 gfx::NativeWindow charger_window_; | 59 gfx::NativeWindow charger_window_; |
60 ChargerReplacementDialog* dialog_; | 60 ChargerReplacementDialog* dialog_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(ChargerReplacementHandler); | 62 DISALLOW_COPY_AND_ASSIGN(ChargerReplacementHandler); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace chromeos | 65 } // namespace chromeos |
66 | 66 |
67 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHARGER_REPLACEMENT_HANDLER_H_ | 67 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHARGER_REPLACEMENT_HANDLER_H_ |
OLD | NEW |