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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h

Issue 2700303002: cros: Unify oobe View/Actor naming to just View. (Closed)
Patch Set: Rebase Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_LOGIN_HID_DETECTION_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/chromeos/login/screens/hid_detection_view.h" 13 #include "chrome/browser/chromeos/login/screens/hid_detection_view.h"
14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
15 #include "components/prefs/pref_registry_simple.h" 15 #include "components/prefs/pref_registry_simple.h"
16 #include "content/public/browser/web_ui.h" 16 #include "content/public/browser/web_ui.h"
17 17
18 namespace chromeos { 18 namespace chromeos {
19 19
20 class CoreOobeActor; 20 class CoreOobeView;
21 21
22 // WebUI implementation of HIDDetectionScreenView. 22 // WebUI implementation of HIDDetectionScreenView.
23 class HIDDetectionScreenHandler 23 class HIDDetectionScreenHandler
24 : public HIDDetectionView, 24 : public HIDDetectionView,
25 public BaseScreenHandler { 25 public BaseScreenHandler {
26 public: 26 public:
27 27 explicit HIDDetectionScreenHandler(CoreOobeView* core_oobe_view);
28 explicit HIDDetectionScreenHandler(CoreOobeActor* core_oobe_actor);
29 ~HIDDetectionScreenHandler() override; 28 ~HIDDetectionScreenHandler() override;
30 29
31 // HIDDetectionView implementation: 30 // HIDDetectionView implementation:
32 void Show() override; 31 void Show() override;
33 void Hide() override; 32 void Hide() override;
34 void Bind(HIDDetectionScreen* screen) override; 33 void Bind(HIDDetectionScreen* screen) override;
35 void Unbind() override; 34 void Unbind() override;
36 void CheckIsScreenRequired( 35 void CheckIsScreenRequired(
37 const base::Callback<void(bool)>& on_check_done) override; 36 const base::Callback<void(bool)>& on_check_done) override;
38 37
39 // BaseScreenHandler implementation: 38 // BaseScreenHandler implementation:
40 void DeclareLocalizedValues( 39 void DeclareLocalizedValues(
41 ::login::LocalizedValuesBuilder* builder) override; 40 ::login::LocalizedValuesBuilder* builder) override;
42 void DeclareJSCallbacks() override; 41 void DeclareJSCallbacks() override;
43 void Initialize() override; 42 void Initialize() override;
44 43
45 // Registers the preference for derelict state. 44 // Registers the preference for derelict state.
46 static void RegisterPrefs(PrefRegistrySimple* registry); 45 static void RegisterPrefs(PrefRegistrySimple* registry);
47 46
48 private: 47 private:
49 // JS messages handlers. 48 // JS messages handlers.
50 void HandleOnContinue(); 49 void HandleOnContinue();
51 50
52 HIDDetectionScreen* screen_ = nullptr; 51 HIDDetectionScreen* screen_ = nullptr;
53 52
54 CoreOobeActor* core_oobe_actor_ = nullptr; 53 CoreOobeView* core_oobe_view_ = nullptr;
55 54
56 // If true, Initialize() will call Show(). 55 // If true, Initialize() will call Show().
57 bool show_on_init_ = false; 56 bool show_on_init_ = false;
58 57
59 DISALLOW_COPY_AND_ASSIGN(HIDDetectionScreenHandler); 58 DISALLOW_COPY_AND_ASSIGN(HIDDetectionScreenHandler);
60 }; 59 };
61 60
62 } // namespace chromeos 61 } // namespace chromeos
63 62
64 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H _ 63 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H _
65 64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698