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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_api.h

Issue 10702017: Revert r 144574 "Modify experimental identity flow to display scope descriptions and details." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('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 (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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" 12 #include "chrome/browser/extensions/api/identity/web_auth_flow.h"
14 #include "chrome/browser/extensions/app_notify_channel_setup.h" 13 #include "chrome/browser/extensions/app_notify_channel_setup.h"
15 #include "chrome/browser/extensions/extension_function.h" 14 #include "chrome/browser/extensions/extension_function.h"
16 #include "chrome/common/net/gaia/oauth2_mint_token_flow.h" 15 #include "chrome/common/net/gaia/oauth2_mint_token_flow.h"
17 16
18 class GoogleServiceAuthError; 17 class GoogleServiceAuthError;
19 18
20 namespace extensions { 19 namespace extensions {
21 20
22 class GetAuthTokenFunction : public AsyncExtensionFunction, 21 class GetAuthTokenFunction : public AsyncExtensionFunction,
23 public OAuth2MintTokenFlow::Delegate { 22 public OAuth2MintTokenFlow::Delegate {
24 public: 23 public:
25 DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.getAuthToken"); 24 DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.getAuthToken");
26 25
27 GetAuthTokenFunction(); 26 GetAuthTokenFunction();
28 27
29 private: 28 private:
30 virtual ~GetAuthTokenFunction(); 29 virtual ~GetAuthTokenFunction();
31 30
32 // ExtensionFunction: 31 // ExtensionFunction:
33 virtual bool RunImpl() OVERRIDE; 32 virtual bool RunImpl() OVERRIDE;
34 33
35 // OAuth2MintTokenFlow::Delegate implementation: 34 // OAuth2MintTokenFlow::Delegate implementation:
36 virtual void OnMintTokenSuccess(const std::string& access_token) OVERRIDE; 35 virtual void OnMintTokenSuccess(const std::string& access_token) OVERRIDE;
37 virtual void OnMintTokenFailure(const GoogleServiceAuthError& error) OVERRIDE; 36 virtual void OnMintTokenFailure(const GoogleServiceAuthError& error) OVERRIDE;
38 virtual void OnIssueAdviceSuccess(
39 const IssueAdviceInfo& issue_advice) OVERRIDE;
40 37
41 scoped_ptr<OAuth2MintTokenFlow> flow_; 38 scoped_ptr<OAuth2MintTokenFlow> flow_;
42 }; 39 };
43 40
44 class LaunchWebAuthFlowFunction : public AsyncExtensionFunction, 41 class LaunchWebAuthFlowFunction : public AsyncExtensionFunction,
45 public WebAuthFlow::Delegate { 42 public WebAuthFlow::Delegate {
46 public: 43 public:
47 LaunchWebAuthFlowFunction(); 44 LaunchWebAuthFlowFunction();
48 45
49 private: 46 private:
50 virtual ~LaunchWebAuthFlowFunction(); 47 virtual ~LaunchWebAuthFlowFunction();
51 virtual bool RunImpl() OVERRIDE; 48 virtual bool RunImpl() OVERRIDE;
52 49
53 // WebAuthFlow::Delegate implementation. 50 // WebAuthFlow::Delegate implementation.
54 virtual void OnAuthFlowSuccess(const std::string& redirect_url) OVERRIDE; 51 virtual void OnAuthFlowSuccess(const std::string& redirect_url) OVERRIDE;
55 virtual void OnAuthFlowFailure() OVERRIDE; 52 virtual void OnAuthFlowFailure() OVERRIDE;
56 53
57 scoped_ptr<WebAuthFlow> auth_flow_; 54 scoped_ptr<WebAuthFlow> auth_flow_;
58 55
59 DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.launchWebAuthFlow"); 56 DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.launchWebAuthFlow");
60 }; 57 };
61 58
62 } // namespace extensions 59 } // namespace extensions
63 60
64 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ 61 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698