OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PROFILES_PROFILE_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/profiles/profile_metrics.h" | 10 #include "chrome/browser/profiles/profile_metrics.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER, | 35 USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER, |
36 }; | 36 }; |
37 | 37 |
38 extern const char kUserManagerDisplayTutorial[]; | 38 extern const char kUserManagerDisplayTutorial[]; |
39 extern const char kUserManagerSelectProfileTaskManager[]; | 39 extern const char kUserManagerSelectProfileTaskManager[]; |
40 extern const char kUserManagerSelectProfileAboutChrome[]; | 40 extern const char kUserManagerSelectProfileAboutChrome[]; |
41 extern const char kUserManagerSelectProfileChromeSettings[]; | 41 extern const char kUserManagerSelectProfileChromeSettings[]; |
42 extern const char kUserManagerSelectProfileChromeMemory[]; | 42 extern const char kUserManagerSelectProfileChromeMemory[]; |
43 extern const char kUserManagerSelectProfileAppLauncher[]; | 43 extern const char kUserManagerSelectProfileAppLauncher[]; |
44 | 44 |
| 45 // This class observes the WebUI used in the UserManager to perform online |
| 46 // reauthentication of locked profiles. Its concretely implemented in |
| 47 // UserManagerMac and UserManagerView to specialize the closing of the UI's |
| 48 // dialog widget. |
| 49 class ReauthDialogObserver : public content::WebContentsObserver { |
| 50 public: |
| 51 ReauthDialogObserver(content::WebContents* web_contents, |
| 52 const std::string& email_address); |
| 53 ~ReauthDialogObserver() override {} |
| 54 |
| 55 private: |
| 56 // content::WebContentsObserver: |
| 57 void DidStopLoading() override; |
| 58 |
| 59 virtual void CloseReauthDialog() = 0; |
| 60 |
| 61 const std::string email_address_; |
| 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(ReauthDialogObserver); |
| 64 }; |
| 65 |
45 // Returns the path of the profile connected to the given email. If no profile | 66 // Returns the path of the profile connected to the given email. If no profile |
46 // is found an empty file path is returned. | 67 // is found an empty file path is returned. |
47 base::FilePath GetPathOfProfileWithEmail(ProfileManager* profile_manager, | 68 base::FilePath GetPathOfProfileWithEmail(ProfileManager* profile_manager, |
48 const std::string& email); | 69 const std::string& email); |
49 | 70 |
50 // Activates a window for |profile| on the desktop specified by | 71 // Activates a window for |profile| on the desktop specified by |
51 // |desktop_type|. If no such window yet exists, or if |always_create| is | 72 // |desktop_type|. If no such window yet exists, or if |always_create| is |
52 // true, this first creates a new window, then activates | 73 // true, this first creates a new window, then activates |
53 // that. If activating an exiting window and multiple windows exists then the | 74 // that. If activating an exiting window and multiple windows exists then the |
54 // window that was most recently active is activated. This is used for | 75 // window that was most recently active is activated. This is used for |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bool ShouldShowWelcomeUpgradeTutorial( | 154 bool ShouldShowWelcomeUpgradeTutorial( |
134 Profile* profile, TutorialMode tutorial_mode); | 155 Profile* profile, TutorialMode tutorial_mode); |
135 | 156 |
136 // Returns true if the tutorial informing the user about right-click user | 157 // Returns true if the tutorial informing the user about right-click user |
137 // switching should be shown, false otherwise. | 158 // switching should be shown, false otherwise. |
138 bool ShouldShowRightClickTutorial(Profile* profile); | 159 bool ShouldShowRightClickTutorial(Profile* profile); |
139 | 160 |
140 } // namespace profiles | 161 } // namespace profiles |
141 | 162 |
142 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ | 163 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
OLD | NEW |