| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MOBILE_MOBILE_ACTIVATOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Activation state. | 55 // Activation state. |
| 56 enum PlanActivationState { | 56 enum PlanActivationState { |
| 57 // Activation WebUI page is loading, activation not started. | 57 // Activation WebUI page is loading, activation not started. |
| 58 PLAN_ACTIVATION_PAGE_LOADING = -1, | 58 PLAN_ACTIVATION_PAGE_LOADING = -1, |
| 59 // Activation process started. | 59 // Activation process started. |
| 60 PLAN_ACTIVATION_START = 0, | 60 PLAN_ACTIVATION_START = 0, |
| 61 // Initial over the air activation attempt. | 61 // Initial over the air activation attempt. |
| 62 PLAN_ACTIVATION_TRYING_OTASP = 1, | 62 PLAN_ACTIVATION_TRYING_OTASP = 1, |
| 63 // Performing pre-activation process. | 63 // Performing pre-activation process. |
| 64 PLAN_ACTIVATION_INITIATING_ACTIVATION = 3, | 64 PLAN_ACTIVATION_INITIATING_ACTIVATION = 3, |
| 65 // Reconnecting to network. | 65 // Reconnecting to network. Used for networks activated over cellular |
| 66 // connection. |
| 66 PLAN_ACTIVATION_RECONNECTING = 4, | 67 PLAN_ACTIVATION_RECONNECTING = 4, |
| 68 // Passively waiting for a network connection. Used for networks activated |
| 69 // over non-cellular network. |
| 70 PLAN_ACTIVATION_WAITING_FOR_CONNECTION = 5, |
| 67 // Loading payment portal page. | 71 // Loading payment portal page. |
| 68 PLAN_ACTIVATION_PAYMENT_PORTAL_LOADING = 5, | 72 PLAN_ACTIVATION_PAYMENT_PORTAL_LOADING = 6, |
| 69 // Showing payment portal page. | 73 // Showing payment portal page. |
| 70 PLAN_ACTIVATION_SHOWING_PAYMENT = 6, | 74 PLAN_ACTIVATION_SHOWING_PAYMENT = 7, |
| 71 // Decides whether to load the portal again or call us done. | 75 // Decides whether to load the portal again or call us done. |
| 72 PLAN_ACTIVATION_RECONNECTING_PAYMENT = 7, | 76 PLAN_ACTIVATION_RECONNECTING_PAYMENT = 8, |
| 73 // Delaying activation until payment portal catches up. | 77 // Delaying activation until payment portal catches up. |
| 74 PLAN_ACTIVATION_DELAY_OTASP = 8, | 78 PLAN_ACTIVATION_DELAY_OTASP = 9, |
| 75 // Starting post-payment activation attempt. | 79 // Starting post-payment activation attempt. |
| 76 PLAN_ACTIVATION_START_OTASP = 9, | 80 PLAN_ACTIVATION_START_OTASP = 10, |
| 77 // Attempting activation. | 81 // Attempting activation. |
| 78 PLAN_ACTIVATION_OTASP = 10, | 82 PLAN_ACTIVATION_OTASP = 11, |
| 79 // Finished activation. | 83 // Finished activation. |
| 80 PLAN_ACTIVATION_DONE = 12, | 84 PLAN_ACTIVATION_DONE = 12, |
| 81 // Error occured during activation process. | 85 // Error occured during activation process. |
| 82 PLAN_ACTIVATION_ERROR = 0xFF, | 86 PLAN_ACTIVATION_ERROR = 0xFF, |
| 83 }; | 87 }; |
| 84 | 88 |
| 85 // Activation process observer. | 89 // Activation process observer. |
| 86 class Observer { | 90 class Observer { |
| 87 public: | 91 public: |
| 88 // Signals activation |state| change for given |network|. | 92 // Signals activation |state| change for given |network|. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 253 |
| 250 | 254 |
| 251 ObserverList<Observer> observers_; | 255 ObserverList<Observer> observers_; |
| 252 | 256 |
| 253 DISALLOW_COPY_AND_ASSIGN(MobileActivator); | 257 DISALLOW_COPY_AND_ASSIGN(MobileActivator); |
| 254 }; | 258 }; |
| 255 | 259 |
| 256 } // namespace chromeos | 260 } // namespace chromeos |
| 257 | 261 |
| 258 #endif // CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_ | 262 #endif // CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_ |
| OLD | NEW |