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

Side by Side Diff: chrome/browser/ui/views/profiles/user_manager_view.h

Issue 2351173004: Display local signin error without browser and record the path of selected profile in user manager. (Closed)
Patch Set: cr Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 ReauthDelegate(UserManagerView* parent, 25 ReauthDelegate(UserManagerView* parent,
26 views::WebView* web_view, 26 views::WebView* web_view,
27 const std::string& email_address, 27 const std::string& email_address,
28 signin_metrics::Reason reason); 28 signin_metrics::Reason reason);
29 ~ReauthDelegate() override; 29 ~ReauthDelegate() override;
30 30
31 // UserManager::BaseReauthDialogDelegate: 31 // UserManager::BaseReauthDialogDelegate:
32 void CloseReauthDialog() override; 32 void CloseReauthDialog() override;
33 33
34 // Display the local error message inside login window.
35 void DisplayErrorMessage();
36
34 private: 37 private:
35 ReauthDelegate(); 38 ReauthDelegate();
36 39
37 // Before its destruction, tells its parent container to reset its reference 40 // Before its destruction, tells its parent container to reset its reference
38 // to the ReauthDelegate. 41 // to the ReauthDelegate.
39 void OnReauthDialogDestroyed(); 42 void OnReauthDialogDestroyed();
40 43
41 // views::DialogDelegate: 44 // views::DialogDelegate:
42 gfx::Size GetPreferredSize() const override; 45 gfx::Size GetPreferredSize() const override;
43 bool CanResize() const override; 46 bool CanResize() const override;
44 bool CanMaximize() const override; 47 bool CanMaximize() const override;
45 bool CanMinimize() const override; 48 bool CanMinimize() const override;
46 bool ShouldUseCustomFrame() const override; 49 bool ShouldUseCustomFrame() const override;
47 ui::ModalType GetModalType() const override; 50 ui::ModalType GetModalType() const override;
48 void DeleteDelegate() override; 51 void DeleteDelegate() override;
49 base::string16 GetWindowTitle() const override; 52 base::string16 GetWindowTitle() const override;
50 int GetDialogButtons() const override; 53 int GetDialogButtons() const override;
51 views::View* GetInitiallyFocusedView() override; 54 views::View* GetInitiallyFocusedView() override;
52 55
53 UserManagerView* parent_; // Not owned. 56 UserManagerView* parent_; // Not owned.
54 views::WebView* web_view_; 57 views::WebView* web_view_;
55 const std::string email_address_; 58 const std::string email_address_;
56 59
57 DISALLOW_COPY_AND_ASSIGN(ReauthDelegate); 60 DISALLOW_COPY_AND_ASSIGN(ReauthDelegate);
58 }; 61 };
59 62
60 namespace views { 63 namespace views {
61 class WebView; 64 class WebView;
62 } 65 }
63 66
(...skipping 26 matching lines...) Expand all
90 // reauthenticated. 93 // reauthenticated.
91 // reason| can be REASON_UNLOCK or REASON_REAUTHENTICATION to indicate 94 // reason| can be REASON_UNLOCK or REASON_REAUTHENTICATION to indicate
92 // whether this is a reauth or unlock scenario. 95 // whether this is a reauth or unlock scenario.
93 void ShowReauthDialog(content::BrowserContext* browser_context, 96 void ShowReauthDialog(content::BrowserContext* browser_context,
94 const std::string& email, 97 const std::string& email,
95 signin_metrics::Reason reason); 98 signin_metrics::Reason reason);
96 99
97 // Hides the reauth dialog if it is showing. 100 // Hides the reauth dialog if it is showing.
98 void HideReauthDialog(); 101 void HideReauthDialog();
99 102
103 // Display sign in error message without browser.
104 void DisplayErrorMessage();
105
106 void SetSigninProfilePath(const base::FilePath& profile_path);
107 base::FilePath GetSigninProfilePath();
108
100 private: 109 private:
101 friend class ReauthDelegate; 110 friend class ReauthDelegate;
102 friend std::default_delete<UserManagerView>; 111 friend std::default_delete<UserManagerView>;
103 112
104 ~UserManagerView() override; 113 ~UserManagerView() override;
105 114
106 // Resets delegate_ to nullptr when delegate_ is no longer alive. 115 // Resets delegate_ to nullptr when delegate_ is no longer alive.
107 void OnReauthDialogDestroyed(); 116 void OnReauthDialogDestroyed();
108 117
109 // Creates dialog and initializes UI. 118 // Creates dialog and initializes UI.
(...skipping 12 matching lines...) Expand all
122 void WindowClosing() override; 131 void WindowClosing() override;
123 bool ShouldUseCustomFrame() const override; 132 bool ShouldUseCustomFrame() const override;
124 133
125 views::WebView* web_view_; 134 views::WebView* web_view_;
126 135
127 ReauthDelegate* delegate_; 136 ReauthDelegate* delegate_;
128 137
129 std::unique_ptr<ScopedKeepAlive> keep_alive_; 138 std::unique_ptr<ScopedKeepAlive> keep_alive_;
130 base::Time user_manager_started_showing_; 139 base::Time user_manager_started_showing_;
131 140
141 base::FilePath signin_profile_path_;
142
132 DISALLOW_COPY_AND_ASSIGN(UserManagerView); 143 DISALLOW_COPY_AND_ASSIGN(UserManagerView);
133 }; 144 };
134 145
135 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ 146 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698