Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(729)

Side by Side Diff: chrome/browser/ui/views/profiles/user_manager_view.h

Issue 239543012: The User Manager should be backed by a special profile, not the guest one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nico's comment + fix tests Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/profiles/profile_window.h" 9 #include "chrome/browser/profiles/profile_window.h"
10 #include "ui/views/window/dialog_delegate.h" 10 #include "ui/views/window/dialog_delegate.h"
(...skipping 17 matching lines...) Expand all
28 // Hide the User Manager. 28 // Hide the User Manager.
29 static void Hide(); 29 static void Hide();
30 30
31 // Returns whether or not the User Manager is showing. 31 // Returns whether or not the User Manager is showing.
32 static bool IsShowing(); 32 static bool IsShowing();
33 33
34 private: 34 private:
35 explicit UserManagerView(Profile* profile); 35 explicit UserManagerView(Profile* profile);
36 virtual ~UserManagerView(); 36 virtual ~UserManagerView();
37 37
38 // Creates a new UserManagerView instance for the |guest_profile| and 38 // Creates a new UserManagerView instance for |profile| and shows the |url|.
39 // shows the |url|. 39 static void OnUserManagerProfileCreated(Profile* profile,
40 static void OnGuestProfileCreated(Profile* guest_profile, 40 const std::string& url);
41 const std::string& url);
42 41
43 // views::View: 42 // views::View:
44 virtual gfx::Size GetPreferredSize() OVERRIDE; 43 virtual gfx::Size GetPreferredSize() OVERRIDE;
45 44
46 // views::DialogDelegateView: 45 // views::DialogDelegateView:
47 virtual bool CanResize() const OVERRIDE; 46 virtual bool CanResize() const OVERRIDE;
48 virtual bool CanMaximize() const OVERRIDE; 47 virtual bool CanMaximize() const OVERRIDE;
49 virtual base::string16 GetWindowTitle() const OVERRIDE; 48 virtual base::string16 GetWindowTitle() const OVERRIDE;
50 virtual int GetDialogButtons() const OVERRIDE; 49 virtual int GetDialogButtons() const OVERRIDE;
51 virtual void WindowClosing() OVERRIDE; 50 virtual void WindowClosing() OVERRIDE;
52 virtual bool UseNewStyleForThisDialog() const OVERRIDE; 51 virtual bool UseNewStyleForThisDialog() const OVERRIDE;
53 52
54 views::WebView* web_view_; 53 views::WebView* web_view_;
55 54
56 scoped_ptr<AutoKeepAlive> keep_alive_; 55 scoped_ptr<AutoKeepAlive> keep_alive_;
57 // An open User Manager window. There can only be one open at a time. This 56 // An open User Manager window. There can only be one open at a time. This
58 // is reset to NULL when the window is closed. 57 // is reset to NULL when the window is closed.
59 static UserManagerView* instance_; 58 static UserManagerView* instance_;
60 59
61 DISALLOW_COPY_AND_ASSIGN(UserManagerView); 60 DISALLOW_COPY_AND_ASSIGN(UserManagerView);
62 }; 61 };
63 62
64 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ 63 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/user_manager_mac_unittest.mm ('k') | chrome/browser/ui/views/profiles/user_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698