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

Side by Side Diff: chrome/browser/chromeos/login/screens/host_pairing_screen.h

Issue 673813003: SetHostConfiguration() and ConfigureHost() are moved from ScreenObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 6 years, 1 month 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_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/chromeos/login/screens/base_screen.h" 9 #include "chrome/browser/chromeos/login/screens/base_screen.h"
10 #include "chrome/browser/chromeos/login/screens/host_pairing_screen_actor.h" 10 #include "chrome/browser/chromeos/login/screens/host_pairing_screen_actor.h"
11 #include "components/login/screens/screen_context.h" 11 #include "components/login/screens/screen_context.h"
12 #include "components/pairing/host_pairing_controller.h" 12 #include "components/pairing/host_pairing_controller.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 class HostPairingScreen 16 class HostPairingScreen
17 : public BaseScreen, 17 : public BaseScreen,
18 public pairing_chromeos::HostPairingController::Observer, 18 public pairing_chromeos::HostPairingController::Observer,
19 public HostPairingScreenActor::Delegate { 19 public HostPairingScreenActor::Delegate {
20 public: 20 public:
21 class Delegate {
22 public:
23 virtual ~Delegate() {}
24 virtual void ConfigureHost(bool accepted_eula,
25 const std::string& lang,
26 const std::string& timezone,
27 bool send_reports,
28 const std::string& keyboard_layout) = 0;
29 };
30
21 HostPairingScreen(ScreenObserver* observer, HostPairingScreenActor* actor, 31 HostPairingScreen(ScreenObserver* observer, HostPairingScreenActor* actor,
22 pairing_chromeos::HostPairingController* remora_controller); 32 pairing_chromeos::HostPairingController* remora_controller);
23 virtual ~HostPairingScreen(); 33 virtual ~HostPairingScreen();
24 34
35 void SetDelegate(Delegate* delegate);
achuithb 2014/10/27 18:50:57 I think passing this into the ctor cuts a few unne
36
25 private: 37 private:
26 typedef pairing_chromeos::HostPairingController::Stage Stage; 38 typedef pairing_chromeos::HostPairingController::Stage Stage;
27 39
28 void CommitContextChanges(); 40 void CommitContextChanges();
29 41
30 // Overridden from BaseScreen: 42 // Overridden from BaseScreen:
31 virtual void PrepareToShow() override; 43 virtual void PrepareToShow() override;
32 virtual void Show() override; 44 virtual void Show() override;
33 virtual void Hide() override; 45 virtual void Hide() override;
34 virtual std::string GetName() const override; 46 virtual std::string GetName() const override;
(...skipping 12 matching lines...) Expand all
47 59
48 // Context for sharing data between C++ and JS. 60 // Context for sharing data between C++ and JS.
49 // TODO(dzhioev): move to BaseScreen when possible. 61 // TODO(dzhioev): move to BaseScreen when possible.
50 ::login::ScreenContext context_; 62 ::login::ScreenContext context_;
51 63
52 HostPairingScreenActor* actor_; 64 HostPairingScreenActor* actor_;
53 65
54 // Controller performing pairing. Owned by the wizard controller. 66 // Controller performing pairing. Owned by the wizard controller.
55 pairing_chromeos::HostPairingController* remora_controller_; 67 pairing_chromeos::HostPairingController* remora_controller_;
56 68
69 Delegate* delegate_;
70
57 // Current stage of pairing process. 71 // Current stage of pairing process.
58 Stage current_stage_; 72 Stage current_stage_;
59 73
60 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen); 74 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen);
61 }; 75 };
62 76
63 } // namespace chromeos 77 } // namespace chromeos
64 78
65 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ 79 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698