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_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 void OnMintTokenSuccess(const std::string& access_token, | 257 void OnMintTokenSuccess(const std::string& access_token, |
258 int time_to_live) override; | 258 int time_to_live) override; |
259 void OnMintTokenFailure(const GoogleServiceAuthError& error) override; | 259 void OnMintTokenFailure(const GoogleServiceAuthError& error) override; |
260 void OnIssueAdviceSuccess(const IssueAdviceInfo& issue_advice) override; | 260 void OnIssueAdviceSuccess(const IssueAdviceInfo& issue_advice) override; |
261 | 261 |
262 // IdentityAPI::ShutdownObserver implementation: | 262 // IdentityAPI::ShutdownObserver implementation: |
263 void OnShutdown() override; | 263 void OnShutdown() override; |
264 | 264 |
265 #if defined(OS_CHROMEOS) | 265 #if defined(OS_CHROMEOS) |
266 // Starts a login access token request for device robot account. This method | 266 // Starts a login access token request for device robot account. This method |
267 // will be called only in enterprise kiosk mode in ChromeOS. | 267 // will be called only in Chrome OS for: |
| 268 // 1. Enterprise kiosk mode. |
| 269 // 2. Whitelisted first party apps in public session. |
268 virtual void StartDeviceLoginAccessTokenRequest(); | 270 virtual void StartDeviceLoginAccessTokenRequest(); |
| 271 |
| 272 bool IsOriginWhitelistedInPublicSession(); |
269 #endif | 273 #endif |
270 | 274 |
271 // Methods for invoking UI. Overridable for testing. | 275 // Methods for invoking UI. Overridable for testing. |
272 virtual void ShowLoginPopup(); | 276 virtual void ShowLoginPopup(); |
273 virtual void ShowOAuthApprovalDialog(const IssueAdviceInfo& issue_advice); | 277 virtual void ShowOAuthApprovalDialog(const IssueAdviceInfo& issue_advice); |
274 | 278 |
275 // Checks if there is a master login token to mint tokens for the extension. | 279 // Checks if there is a master login token to mint tokens for the extension. |
276 bool HasLoginToken() const; | 280 bool HasLoginToken() const; |
277 | 281 |
278 // Maps OAuth2 protocol errors to an error message returned to the | 282 // Maps OAuth2 protocol errors to an error message returned to the |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 // Helper to initialize final URL prefix. | 353 // Helper to initialize final URL prefix. |
350 void InitFinalRedirectURLPrefix(const std::string& extension_id); | 354 void InitFinalRedirectURLPrefix(const std::string& extension_id); |
351 | 355 |
352 scoped_ptr<WebAuthFlow> auth_flow_; | 356 scoped_ptr<WebAuthFlow> auth_flow_; |
353 GURL final_url_prefix_; | 357 GURL final_url_prefix_; |
354 }; | 358 }; |
355 | 359 |
356 } // namespace extensions | 360 } // namespace extensions |
357 | 361 |
358 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 362 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
OLD | NEW |