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

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

Issue 15148007: Identity API: web-based scope approval dialogs for getAuthToken (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address reviewer comments Created 7 years, 7 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
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_WEB_AUTH_FLOW_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_WEB_AUTH_FLOW_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_WEB_AUTH_FLOW_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_WEB_AUTH_FLOW_H_
7 7
8 #include "chrome/browser/ui/host_desktop.h" 8 #include "chrome/browser/ui/host_desktop.h"
9 #include "content/public/browser/notification_observer.h" 9 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h" 10 #include "content/public/browser/notification_registrar.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 }; 51 };
52 52
53 class Delegate { 53 class Delegate {
54 public: 54 public:
55 // Called when the auth flow fails. This means that the flow did not result 55 // Called when the auth flow fails. This means that the flow did not result
56 // in a successful redirect to a valid redirect URL. 56 // in a successful redirect to a valid redirect URL.
57 virtual void OnAuthFlowFailure(Failure failure) = 0; 57 virtual void OnAuthFlowFailure(Failure failure) = 0;
58 // Called on redirects and other navigations to see if the URL should stop 58 // Called on redirects and other navigations to see if the URL should stop
59 // the flow. 59 // the flow.
60 virtual void OnAuthFlowURLChange(const GURL& redirect_url) = 0; 60 virtual void OnAuthFlowURLChange(const GURL& redirect_url) = 0;
61 // Called when the title of the current page changes.
62 virtual void OnAuthFlowTitleChange(const std::string& title) = 0;
61 63
62 protected: 64 protected:
63 virtual ~Delegate() {} 65 virtual ~Delegate() {}
64 }; 66 };
65 67
66 // Creates an instance with the given parameters. 68 // Creates an instance with the given parameters.
67 // Caller owns |delegate|. 69 // Caller owns |delegate|.
68 WebAuthFlow(Delegate* delegate, 70 WebAuthFlow(Delegate* delegate,
69 Profile* profile, 71 Profile* profile,
70 const GURL& provider_url, 72 const GURL& provider_url,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 113
112 content::WebContents* contents_; 114 content::WebContents* contents_;
113 content::NotificationRegistrar registrar_; 115 content::NotificationRegistrar registrar_;
114 116
115 DISALLOW_COPY_AND_ASSIGN(WebAuthFlow); 117 DISALLOW_COPY_AND_ASSIGN(WebAuthFlow);
116 }; 118 };
117 119
118 } // namespace extensions 120 } // namespace extensions
119 121
120 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_WEB_AUTH_FLOW_H_ 122 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_WEB_AUTH_FLOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_apitest.cc ('k') | chrome/browser/extensions/api/identity/web_auth_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698