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

Side by Side Diff: chromeos/pairing/controller_pairing_flow.h

Issue 343433003: Implemented fake controller pairing flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed GCC compilation. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/pairing/fake_controller_pairing_flow.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROMEOS_PAIRING_CONTROLLER_PAIRING_FLOW_H_ 5 #ifndef CHROMEOS_PAIRING_CONTROLLER_PAIRING_FLOW_H_
6 #define CHROMEOS_PAIRING_CONTROLLER_PAIRING_FLOW_H_ 6 #define CHROMEOS_PAIRING_CONTROLLER_PAIRING_FLOW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 STAGE_DEVICE_NOT_FOUND, 29 STAGE_DEVICE_NOT_FOUND,
30 STAGE_ESTABLISHING_CONNECTION, 30 STAGE_ESTABLISHING_CONNECTION,
31 STAGE_ESTABLISHING_CONNECTION_ERROR, 31 STAGE_ESTABLISHING_CONNECTION_ERROR,
32 STAGE_WAITING_FOR_CODE_CONFIRMATION, 32 STAGE_WAITING_FOR_CODE_CONFIRMATION,
33 STAGE_HOST_UPDATE_IN_PROGRESS, 33 STAGE_HOST_UPDATE_IN_PROGRESS,
34 STAGE_HOST_CONNECTION_LOST, 34 STAGE_HOST_CONNECTION_LOST,
35 STAGE_WAITING_FOR_CREDENTIALS, 35 STAGE_WAITING_FOR_CREDENTIALS,
36 STAGE_HOST_ENROLLMENT_IN_PROGRESS, 36 STAGE_HOST_ENROLLMENT_IN_PROGRESS,
37 STAGE_HOST_ENROLLMENT_ERROR, 37 STAGE_HOST_ENROLLMENT_ERROR,
38 STAGE_PAIRING_DONE, 38 STAGE_PAIRING_DONE,
39 STAGE_STARTING_SESSION,
40 STAGE_FINISHED 39 STAGE_FINISHED
41 }; 40 };
42 41
43 class Observer { 42 class Observer {
44 public: 43 public:
45 Observer(); 44 Observer();
46 virtual ~Observer(); 45 virtual ~Observer();
47 46
48 // Called when flow has moved on from one stage to another. 47 // Called when flow has moved on from one stage to another.
49 virtual void PairingStageChanged(Stage new_stage) = 0; 48 virtual void PairingStageChanged(Stage new_stage) = 0;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Rescan for devices to pair with. Can be called only on 80 // Rescan for devices to pair with. Can be called only on
82 // |STAGE_DEVICE_NOT_FOUND| stage. 81 // |STAGE_DEVICE_NOT_FOUND| stage.
83 virtual void RepeatDiscovery() = 0; 82 virtual void RepeatDiscovery() = 0;
84 83
85 // Returns pairing confirmation code. 84 // Returns pairing confirmation code.
86 // Could be called only on |STATE_WAITING_FOR_CODE_CONFIRMATION| stage. 85 // Could be called only on |STATE_WAITING_FOR_CODE_CONFIRMATION| stage.
87 virtual std::string GetConfirmationCode() = 0; 86 virtual std::string GetConfirmationCode() = 0;
88 87
89 // Called to confirm or deny confirmation code. Can be called only on 88 // Called to confirm or deny confirmation code. Can be called only on
90 // |STAGE_WAITING_FOR_CODE_CONFIRMATION| stage. 89 // |STAGE_WAITING_FOR_CODE_CONFIRMATION| stage.
91 virtual void SetConfirmationCodeIsCorrect(bool right) = 0; 90 virtual void SetConfirmationCodeIsCorrect(bool correct) = 0;
92 91
93 // Called when user successfully authenticated on GAIA page. Can be called 92 // Called when user successfully authenticated on GAIA page. Can be called
94 // only on |STAGE_WAITING_FOR_CREDENTIALS| stage. 93 // only on |STAGE_WAITING_FOR_CREDENTIALS| stage.
95 virtual void OnAuthenticationDone( 94 virtual void OnAuthenticationDone(
96 const chromeos::UserContext& user_context, 95 const chromeos::UserContext& user_context,
97 content::BrowserContext* browser_context) = 0; 96 content::BrowserContext* browser_context) = 0;
98 97
99 // Installs app and starts session. 98 // Installs app and starts session.
100 // Can be called only on |STAGE_PAIRING_DONE| stage. 99 // Can be called only on |STAGE_PAIRING_DONE| stage.
101 virtual void StartSession() = 0; 100 virtual void StartSession() = 0;
102 101
103 private: 102 private:
104 DISALLOW_COPY_AND_ASSIGN(ControllerPairingFlow); 103 DISALLOW_COPY_AND_ASSIGN(ControllerPairingFlow);
105 }; 104 };
106 105
107 } // namespace chromeos 106 } // namespace chromeos
108 107
109 #endif // CHROMEOS_PAIRING_CONTROLLER_PAIRING_FLOW_H_ 108 #endif // CHROMEOS_PAIRING_CONTROLLER_PAIRING_FLOW_H_
OLDNEW
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/pairing/fake_controller_pairing_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698