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

Side by Side Diff: chrome/browser/ui/extensions/web_auth_flow_window.h

Issue 10178020: Start implementing an auth flow for platform apps to be able to do auth (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_WEB_AUTH_FLOW_WINDOW_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_WEB_AUTH_FLOW_WINDOW_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10
11 class Profile;
12
13 namespace content {
14 class BrowserContext;
15 class WebContents;
16 }
17
18 class WebAuthFlowWindow {
Mihai Parparita -not on Chrome 2012/05/14 20:59:39 Add a brief class-level comment indicating that th
Munjal (Google) 2012/05/15 00:55:20 Done.
19 public:
20 class Delegate {
21 public:
22 virtual void OnClose() = 0;
23 };
24
25 // TODO(munjal): Allow customizing these?
26 static const int kDefaultWidth = 1024;
27 static const int kDefaultHeight = 768;
28
29 // Creates a new instance of WebAuthFlowWindow with the given parmaters.
30 // Delegate::OnClose will be called when the window is closed.
31 static WebAuthFlowWindow* Create(Delegate* delegate,
32 content::BrowserContext* browser_context,
33 content::WebContents* contents);
34
35 virtual ~WebAuthFlowWindow();
36
37 // Show the window.
38 virtual void Show() = 0;
39
40 protected:
41 explicit WebAuthFlowWindow(Delegate* delegate,
42 content::BrowserContext* browser_context,
43 content::WebContents* contents);
44
45 // Instantiates a platform-specific WebAuthFlowWindow subclass (one
46 // implementation per platform). Public users of WebAuthFlowWindow should use
47 // WebAuthFlowWindow::Create.
48 static WebAuthFlowWindow* CreateWebAuthFlowWindow(
49 Delegate* delegate,
50 content::BrowserContext* browser_context,
51 content::WebContents* contents);
52
53 Delegate* delegate_;
54 content::BrowserContext* browser_context_;
55 content::WebContents* contents_;
56
57 private:
58 DISALLOW_COPY_AND_ASSIGN(WebAuthFlowWindow);
59 };
60
61 #endif // CHROME_BROWSER_UI_EXTENSIONS_WEB_AUTH_FLOW_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698