| 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 // Do not call directly. To display the User Manager, use UserManager::Show(). | 22 // Do not call directly. To display the User Manager, use UserManager::Show(). |
| 23 UserManagerView(); | 23 UserManagerView(); |
| 24 | 24 |
| 25 // Creates a new UserManagerView instance for the |guest_profile| and | 25 // Creates a new UserManagerView instance for the |system_profile| and shows |
| 26 // shows the |url|. | 26 // the |url|. |
| 27 static void OnGuestProfileCreated(scoped_ptr<UserManagerView> instance, | 27 static void OnSystemProfileCreated(scoped_ptr<UserManagerView> instance, |
| 28 Profile* guest_profile, | 28 Profile* system_profile, |
| 29 const std::string& url); | 29 const std::string& url); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 ~UserManagerView() override; | 32 ~UserManagerView() override; |
| 33 | 33 |
| 34 friend struct base::DefaultDeleter<UserManagerView>; | 34 friend struct base::DefaultDeleter<UserManagerView>; |
| 35 | 35 |
| 36 // Creates dialog and initializes UI. | 36 // Creates dialog and initializes UI. |
| 37 void Init(Profile* guest_profile, const GURL& url); | 37 void Init(Profile* guest_profile, const GURL& url); |
| 38 | 38 |
| 39 // views::View: | 39 // views::View: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 50 bool UseNewStyleForThisDialog() const override; | 50 bool UseNewStyleForThisDialog() const override; |
| 51 | 51 |
| 52 views::WebView* web_view_; | 52 views::WebView* web_view_; |
| 53 | 53 |
| 54 scoped_ptr<AutoKeepAlive> keep_alive_; | 54 scoped_ptr<AutoKeepAlive> keep_alive_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(UserManagerView); | 56 DISALLOW_COPY_AND_ASSIGN(UserManagerView); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ | 59 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ |
| OLD | NEW |