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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_window.h"
11 #include "ui/views/window/dialog_delegate.h"
19 // Dialog widget that contains the Desktop User Manager webui.
20 class UserManagerView : public views::DialogDelegateView {
22 // Do not call directly. To display the User Manager, use UserManager::Show().
25 // Creates a new UserManagerView instance for the |guest_profile| and
27 static void OnGuestProfileCreated(scoped_ptr<UserManagerView> instance,
28 const base::FilePath& profile_path_to_focus,
29 Profile* guest_profile,
30 const std::string& url);
33 virtual ~UserManagerView();
35 friend struct base::DefaultDeleter<UserManagerView>;
37 // Creates dialog and initializes UI.
38 void Init(const base::FilePath& profile_path_to_focus,
39 Profile* guest_profile,
43 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
44 virtual gfx::Size GetPreferredSize() const OVERRIDE;
46 // views::DialogDelegateView:
47 virtual bool CanResize() const OVERRIDE;
48 virtual bool CanMaximize() const OVERRIDE;
49 virtual bool CanMinimize() const OVERRIDE;
50 virtual base::string16 GetWindowTitle() const OVERRIDE;
51 virtual int GetDialogButtons() const OVERRIDE;
52 virtual void WindowClosing() OVERRIDE;
53 virtual bool UseNewStyleForThisDialog() const OVERRIDE;
55 views::WebView* web_view_;
57 scoped_ptr<AutoKeepAlive> keep_alive_;
59 DISALLOW_COPY_AND_ASSIGN(UserManagerView);
62 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_