OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_GAIA_WEB_AUTH_FLOW_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/api/identity/extension_token_key.h" | 8 #include "chrome/browser/extensions/api/identity/extension_token_key.h" |
9 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" | 9 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" |
10 #include "chrome/browser/ui/host_desktop.h" | |
11 #include "extensions/common/manifest_handlers/oauth2_manifest_handler.h" | 10 #include "extensions/common/manifest_handlers/oauth2_manifest_handler.h" |
12 #include "google_apis/gaia/ubertoken_fetcher.h" | 11 #include "google_apis/gaia/ubertoken_fetcher.h" |
| 12 #include "ui/gfx/host_desktop_type.h" |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 | 15 |
16 // Implements a web-based OAuth2 scope approval dialog. This flow has | 16 // Implements a web-based OAuth2 scope approval dialog. This flow has |
17 // four parts: | 17 // four parts: |
18 // 1. Fetch an ubertoken for a signed-in user. | 18 // 1. Fetch an ubertoken for a signed-in user. |
19 // 2. Use the ubertoken to get session cookies using MergeSession. | 19 // 2. Use the ubertoken to get session cookies using MergeSession. |
20 // 3. Start the OAuth flow and wait for final redirect. | 20 // 3. Start the OAuth flow and wait for final redirect. |
21 // 4. Parse results from the fragment component of the final redirect URI. | 21 // 4. Parse results from the fragment component of the final redirect URI. |
22 // | 22 // |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 GURL auth_url_; | 92 GURL auth_url_; |
93 scoped_ptr<UbertokenFetcher> ubertoken_fetcher_; | 93 scoped_ptr<UbertokenFetcher> ubertoken_fetcher_; |
94 scoped_ptr<WebAuthFlow> web_flow_; | 94 scoped_ptr<WebAuthFlow> web_flow_; |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(GaiaWebAuthFlow); | 96 DISALLOW_COPY_AND_ASSIGN(GaiaWebAuthFlow); |
97 }; | 97 }; |
98 | 98 |
99 } // namespace extensions | 99 } // namespace extensions |
100 | 100 |
101 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ | 101 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ |
OLD | NEW |