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 #include "chrome/browser/ui/app_list/app_list_service_views.h" | 5 #include "chrome/browser/ui/app_list/app_list_service_views.h" |
6 | 6 |
| 7 #include "chrome/browser/apps/scoped_keep_alive.h" |
7 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
8 #include "chrome/browser/ui/app_list/scoped_keep_alive.h" | |
9 #include "ui/app_list/views/app_list_view.h" | 9 #include "ui/app_list/views/app_list_view.h" |
10 | 10 |
11 AppListServiceViews::AppListServiceViews( | 11 AppListServiceViews::AppListServiceViews( |
12 scoped_ptr<AppListControllerDelegate> controller_delegate) | 12 scoped_ptr<AppListControllerDelegate> controller_delegate) |
13 : shower_(this), | 13 : shower_(this), |
14 can_dismiss_(true), | 14 can_dismiss_(true), |
15 controller_delegate_(controller_delegate.Pass()) { | 15 controller_delegate_(controller_delegate.Pass()) { |
16 } | 16 } |
17 | 17 |
18 AppListServiceViews::~AppListServiceViews() {} | 18 AppListServiceViews::~AppListServiceViews() {} |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 // Use CloseNow(). This can't be asynchronous because the profile will be | 71 // Use CloseNow(). This can't be asynchronous because the profile will be |
72 // deleted once this function returns. | 72 // deleted once this function returns. |
73 shower_.app_list()->GetWidget()->CloseNow(); | 73 shower_.app_list()->GetWidget()->CloseNow(); |
74 DCHECK(!shower_.HasView()); | 74 DCHECK(!shower_.HasView()); |
75 } | 75 } |
76 | 76 |
77 AppListViewDelegate* AppListServiceViews::GetViewDelegateForCreate() { | 77 AppListViewDelegate* AppListServiceViews::GetViewDelegateForCreate() { |
78 return GetViewDelegate(shower_.profile()); | 78 return GetViewDelegate(shower_.profile()); |
79 } | 79 } |
OLD | NEW |