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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_USER_MANAGER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_USER_MANAGER_VIEW_H_
8 #include "chrome/browser/profiles/profile.h"
9 #include "ui/views/window/dialog_delegate.h"
15 // Dialog widget that contains the Desktop User Manager webui.
16 class UserManagerView
: public views::DialogDelegateView
{
18 // Shows the User Manager or re-activates an existing one.
19 static void Show(const base::FilePath
& profile_path_to_focus
);
21 // Hide the User Manager.
24 // Returns whether or not the User Manager is showing.
25 static bool IsShowing();
28 explicit UserManagerView(Profile
* profile
);
29 virtual ~UserManagerView();
31 // If the |guest_profile| has been initialized succesfully (according to
32 // |status|), creates a new UserManagerView instance with the user with path
33 // |profile_path_to_focus| focused.
34 static void OnGuestProfileCreated(const base::FilePath
& profile_path_to_focus
,
35 Profile
* guest_profile
,
36 Profile::CreateStatus status
);
39 virtual gfx::Size
GetPreferredSize() OVERRIDE
;
41 // views::DialogDelegateView:
42 virtual bool CanResize() const OVERRIDE
;
43 virtual bool CanMaximize() const OVERRIDE
;
44 virtual base::string16
GetWindowTitle() const OVERRIDE
;
45 virtual int GetDialogButtons() const OVERRIDE
;
46 virtual void WindowClosing() OVERRIDE
;
47 virtual bool UseNewStyleForThisDialog() const OVERRIDE
;
49 views::WebView
* web_view_
;
51 // An open User Manager window. There can only be one open at a time. This
52 // is reset to NULL when the window is closed.
53 static UserManagerView
* instance_
;
55 DISALLOW_COPY_AND_ASSIGN(UserManagerView
);
58 #endif // CHROME_BROWSER_UI_VIEWS_USER_MANAGER_VIEW_H_