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_APP_LIST_APP_LIST_SHOWER_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SHOWER_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SHOWER_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SHOWER_VIEWS_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 | 10 |
11 namespace app_list { | 11 namespace app_list { |
12 class AppListView; | 12 class AppListView; |
13 } | 13 } |
14 | 14 |
| 15 namespace browser_lifetime { |
| 16 class ScopedKeepAlive; |
| 17 } |
| 18 |
15 class AppListShowerDelegate; | 19 class AppListShowerDelegate; |
16 class AppListShowerUnitTest; | 20 class AppListShowerUnitTest; |
17 class Profile; | 21 class Profile; |
18 class ScopedKeepAlive; | |
19 | 22 |
20 // Creates and shows an AppList as needed for non-Ash desktops. It is owned by | 23 // Creates and shows an AppList as needed for non-Ash desktops. It is owned by |
21 // AppListServiceViews. | 24 // AppListServiceViews. |
22 class AppListShower { | 25 class AppListShower { |
23 public: | 26 public: |
24 explicit AppListShower(AppListShowerDelegate* delegate); | 27 explicit AppListShower(AppListShowerDelegate* delegate); |
25 virtual ~AppListShower(); | 28 virtual ~AppListShower(); |
26 | 29 |
27 void ShowForCurrentProfile(); | 30 void ShowForCurrentProfile(); |
28 gfx::NativeWindow GetWindow(); | 31 gfx::NativeWindow GetWindow(); |
(...skipping 28 matching lines...) Expand all Loading... |
57 | 60 |
58 AppListShowerDelegate* delegate_; // Weak. Owns this. | 61 AppListShowerDelegate* delegate_; // Weak. Owns this. |
59 | 62 |
60 // The profile currently shown by |app_list_|. | 63 // The profile currently shown by |app_list_|. |
61 Profile* profile_; | 64 Profile* profile_; |
62 | 65 |
63 // The view, once created. Owned by native widget. | 66 // The view, once created. Owned by native widget. |
64 app_list::AppListView* app_list_; | 67 app_list::AppListView* app_list_; |
65 | 68 |
66 // Used to keep the browser process alive while the app list is visible. | 69 // Used to keep the browser process alive while the app list is visible. |
67 scoped_ptr<ScopedKeepAlive> keep_alive_; | 70 scoped_ptr<browser_lifetime::ScopedKeepAlive> keep_alive_; |
68 | 71 |
69 bool window_icon_updated_; | 72 bool window_icon_updated_; |
70 | 73 |
71 DISALLOW_COPY_AND_ASSIGN(AppListShower); | 74 DISALLOW_COPY_AND_ASSIGN(AppListShower); |
72 }; | 75 }; |
73 | 76 |
74 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SHOWER_VIEWS_H_ | 77 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SHOWER_VIEWS_H_ |
OLD | NEW |