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_UI_WEBUI_CHROMEOS_LOGIN_ENTERPRISE_OAUTH_ENROLLMENT_SCREE
N_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ENTERPRISE_OAUTH_ENROLLMENT_SCREE
N_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ENTERPRISE_OAUTH_ENROLLMENT_SCREE
N_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ENTERPRISE_OAUTH_ENROLLMENT_SCREE
N_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
15 #include "base/values.h" | |
16 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 15 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
17 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen_
actor.h" | 16 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen_
actor.h" |
18 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h" | 17 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h" |
19 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 18 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
20 | 19 |
21 class GaiaOAuthFetcher; | 20 class GaiaOAuthFetcher; |
22 | 21 |
23 namespace chromeos { | 22 namespace chromeos { |
24 | 23 |
25 // WebUIMessageHandler implementation which handles events occurring on the | 24 // WebUIMessageHandler implementation which handles events occurring on the |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 virtual void OnUserInfoSuccess(const std::string& email) OVERRIDE; | 73 virtual void OnUserInfoSuccess(const std::string& email) OVERRIDE; |
75 virtual void OnUserInfoFailure(const GoogleServiceAuthError& error) OVERRIDE; | 74 virtual void OnUserInfoFailure(const GoogleServiceAuthError& error) OVERRIDE; |
76 | 75 |
77 // Implements BrowsingDataRemover::Observer: | 76 // Implements BrowsingDataRemover::Observer: |
78 virtual void OnBrowsingDataRemoverDone() OVERRIDE; | 77 virtual void OnBrowsingDataRemoverDone() OVERRIDE; |
79 | 78 |
80 private: | 79 private: |
81 class TokenRevoker; | 80 class TokenRevoker; |
82 | 81 |
83 // Handlers for WebUI messages. | 82 // Handlers for WebUI messages. |
84 void HandleClose(const base::ListValue* args); | 83 void HandleClose(const std::string& reason); |
85 void HandleCompleteLogin(const base::ListValue* args); | 84 void HandleCompleteLogin(const std::string& user); |
86 void HandleRetry(const base::ListValue* args); | 85 void HandleRetry(); |
87 | 86 |
88 // Shows a given enrollment step. | 87 // Shows a given enrollment step. |
89 void ShowStep(const char* step); | 88 void ShowStep(const char* step); |
90 | 89 |
91 // Display the given i18n resource as error message. | 90 // Display the given i18n resource as error message. |
92 void ShowError(int message_id, bool retry); | 91 void ShowError(int message_id, bool retry); |
93 | 92 |
94 // Display the given string as error message. | 93 // Display the given string as error message. |
95 void ShowErrorMessage(const std::string& message, bool retry); | 94 void ShowErrorMessage(const std::string& message, bool retry); |
96 | 95 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 140 |
142 // Helpers that revoke the tokens used. | 141 // Helpers that revoke the tokens used. |
143 ScopedVector<TokenRevoker> token_revokers_; | 142 ScopedVector<TokenRevoker> token_revokers_; |
144 | 143 |
145 DISALLOW_COPY_AND_ASSIGN(EnterpriseOAuthEnrollmentScreenHandler); | 144 DISALLOW_COPY_AND_ASSIGN(EnterpriseOAuthEnrollmentScreenHandler); |
146 }; | 145 }; |
147 | 146 |
148 } // namespace chromeos | 147 } // namespace chromeos |
149 | 148 |
150 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ENTERPRISE_OAUTH_ENROLLMENT_SC
REEN_HANDLER_H_ | 149 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ENTERPRISE_OAUTH_ENROLLMENT_SC
REEN_HANDLER_H_ |
OLD | NEW |