| OLD | NEW |
| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/profiles/profile_window.h" | 10 #include "chrome/browser/profiles/profile_window.h" |
| 11 #include "ui/views/window/dialog_delegate.h" | 11 #include "ui/views/window/dialog_delegate.h" |
| 12 | 12 |
| 13 class AutoKeepAlive; | 13 class AutoKeepAlive; |
| 14 | 14 |
| 15 namespace views { | 15 namespace views { |
| 16 class WebView; | 16 class WebView; |
| 17 } | 17 } |
| 18 | 18 |
| 19 // Dialog widget that contains the Desktop User Manager webui. | 19 // Dialog widget that contains the Desktop User Manager webui. |
| 20 class UserManagerView : public views::DialogDelegateView { | 20 class UserManagerView : public views::DialogDelegateView { |
| 21 public: | 21 public: |
| 22 // Shows the User Manager or re-activates an existing one, focusing the | 22 // Shows the User Manager or re-activates an existing one, focusing the |
| 23 // profile given by |profile_path_to_focus|. Based on the value of | 23 // profile given by |profile_path_to_focus|. Based on the value of |
| 24 // |tutorial_mode|, a tutorial could be shown, in which case | 24 // |tutorial_mode|, a tutorial could be shown, in which case |
| 25 // |profile_path_to_focus| is ignored. | 25 // |profile_path_to_focus| is ignored. After a profile is opened, execute the |
| 26 // |profile_open_action|. |
| 26 static void Show(const base::FilePath& profile_path_to_focus, | 27 static void Show(const base::FilePath& profile_path_to_focus, |
| 27 profiles::UserManagerTutorialMode tutorial_mode); | 28 profiles::UserManagerTutorialMode tutorial_mode, |
| 29 profiles::UserManagerProfileSelected profile_open_action); |
| 28 | 30 |
| 29 // Hide the User Manager. | 31 // Hide the User Manager. |
| 30 static void Hide(); | 32 static void Hide(); |
| 31 | 33 |
| 32 // Returns whether or not the User Manager is showing. | 34 // Returns whether or not the User Manager is showing. |
| 33 static bool IsShowing(); | 35 static bool IsShowing(); |
| 34 | 36 |
| 35 private: | 37 private: |
| 36 friend struct base::DefaultDeleter<UserManagerView>; | 38 friend struct base::DefaultDeleter<UserManagerView>; |
| 37 | 39 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 66 | 68 |
| 67 scoped_ptr<AutoKeepAlive> keep_alive_; | 69 scoped_ptr<AutoKeepAlive> keep_alive_; |
| 68 // An open User Manager window. There can only be one open at a time. This | 70 // An open User Manager window. There can only be one open at a time. This |
| 69 // is reset to NULL when the window is closed. | 71 // is reset to NULL when the window is closed. |
| 70 static UserManagerView* instance_; | 72 static UserManagerView* instance_; |
| 71 | 73 |
| 72 DISALLOW_COPY_AND_ASSIGN(UserManagerView); | 74 DISALLOW_COPY_AND_ASSIGN(UserManagerView); |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ | 77 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ |
| OLD | NEW |