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 <memory> |
| 9 |
8 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/profiles/profile_window.h" | 13 #include "chrome/browser/profiles/profile_window.h" |
12 #include "ui/views/window/dialog_delegate.h" | 14 #include "ui/views/window/dialog_delegate.h" |
13 | 15 |
14 class AutoKeepAlive; | 16 class AutoKeepAlive; |
15 | 17 |
16 namespace views { | 18 namespace views { |
17 class WebView; | 19 class WebView; |
(...skipping 16 matching lines...) Expand all Loading... |
34 const base::Time& user_manager_started_showing) { | 36 const base::Time& user_manager_started_showing) { |
35 user_manager_started_showing_ = user_manager_started_showing; | 37 user_manager_started_showing_ = user_manager_started_showing; |
36 } | 38 } |
37 | 39 |
38 // Logs how long it took the UserManager to open. | 40 // Logs how long it took the UserManager to open. |
39 void LogTimeToOpen(); | 41 void LogTimeToOpen(); |
40 | 42 |
41 private: | 43 private: |
42 ~UserManagerView() override; | 44 ~UserManagerView() override; |
43 | 45 |
44 friend struct base::DefaultDeleter<UserManagerView>; | 46 friend std::default_delete<UserManagerView>; |
45 | 47 |
46 // Creates dialog and initializes UI. | 48 // Creates dialog and initializes UI. |
47 void Init(Profile* guest_profile, const GURL& url); | 49 void Init(Profile* guest_profile, const GURL& url); |
48 | 50 |
49 // views::View: | 51 // views::View: |
50 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 52 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
51 gfx::Size GetPreferredSize() const override; | 53 gfx::Size GetPreferredSize() const override; |
52 | 54 |
53 // views::DialogDelegateView: | 55 // views::DialogDelegateView: |
54 bool CanResize() const override; | 56 bool CanResize() const override; |
55 bool CanMaximize() const override; | 57 bool CanMaximize() const override; |
56 bool CanMinimize() const override; | 58 bool CanMinimize() const override; |
57 base::string16 GetWindowTitle() const override; | 59 base::string16 GetWindowTitle() const override; |
58 int GetDialogButtons() const override; | 60 int GetDialogButtons() const override; |
59 void WindowClosing() override; | 61 void WindowClosing() override; |
60 bool UseNewStyleForThisDialog() const override; | 62 bool UseNewStyleForThisDialog() const override; |
61 | 63 |
62 views::WebView* web_view_; | 64 views::WebView* web_view_; |
63 | 65 |
64 scoped_ptr<AutoKeepAlive> keep_alive_; | 66 scoped_ptr<AutoKeepAlive> keep_alive_; |
65 base::Time user_manager_started_showing_; | 67 base::Time user_manager_started_showing_; |
66 | 68 |
67 DISALLOW_COPY_AND_ASSIGN(UserManagerView); | 69 DISALLOW_COPY_AND_ASSIGN(UserManagerView); |
68 }; | 70 }; |
69 | 71 |
70 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ | 72 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ |
OLD | NEW |