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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_ui.h

Issue 1681813003: arc: Use incognito profile for OptIn and cookie fetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased, added reseting windowClosedInternally before window creation Created 4 years, 10 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
(Empty)
1 // Copyright 2016 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_CHROMEOS_ARC_ARC_AUTH_UI_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_UI_H_
7
8 #include "base/macros.h"
9 #include "components/arc/auth/arc_auth_fetcher.h"
10 #include "ui/web_dialogs/web_dialog_delegate.h"
11
12 namespace content {
13 class BrowserContext;
14 }
15
16 namespace views {
17 class Widget;
18 }
19
20 namespace arc {
21
22 // Shows ARC LSO web view that requires user input.
23 class ArcAuthUI : public ui::WebDialogDelegate,
24 public ArcAuthFetcher::Delegate {
25 public:
26 class Delegate {
27 public:
28 // Called when dialog is closed.
29 virtual void OnAuthUIClosed() = 0;
30
31 protected:
32 virtual ~Delegate() = default;
33 };
34
35 ArcAuthUI(content::BrowserContext* browser_context, Delegate* delegate);
36 ~ArcAuthUI() override;
37
38 void Close();
39
40 // ui::WebDialogDelegate:
41 ui::ModalType GetDialogModalType() const override;
42 base::string16 GetDialogTitle() const override;
43 GURL GetDialogContentURL() const override;
44 void GetWebUIMessageHandlers(
45 std::vector<content::WebUIMessageHandler*>* handlers) const override;
46 void GetDialogSize(gfx::Size* size) const override;
47 std::string GetDialogArgs() const override;
48 void OnDialogClosed(const std::string& json_retval) override;
49 void OnCloseContents(content::WebContents* source,
50 bool* out_close_dialog) override;
51 bool ShouldShowDialogTitle() const override;
52 bool HandleContextMenu(const content::ContextMenuParams& params) override;
53 void OnLoadingStateChanged(content::WebContents* source) override;
54
55 // ArcAuthFetcher::Delegate:
56 void OnAuthCodeFetched(const std::string& code) override;
57 void OnAuthCodeNeedUI() override;
58 void OnAuthCodeFailed() override;
59
60 private:
61 // Unowned pointers.
62 content::BrowserContext* const browser_context_;
63 Delegate* const delegate_;
64 const GURL target_url_;
65
66 // Owned by view hierarchy.
67 views::Widget* widget_;
68
69 scoped_ptr<ArcAuthFetcher> auth_fetcher_;
70
71 DISALLOW_COPY_AND_ASSIGN(ArcAuthUI);
72 };
73
74 } // namespace arc
75
76 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698