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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_views.cc

Issue 508813002: Move ownership of the AppListViewDelegate into the AppListService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 3 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
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 #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/ui/app_list/app_list_controller_delegate.h" 7 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
8 #include "chrome/browser/ui/app_list/scoped_keep_alive.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
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void AppListServiceViews::DestroyAppList() { 67 void AppListServiceViews::DestroyAppList() {
68 if (!shower_.HasView()) 68 if (!shower_.HasView())
69 return; 69 return;
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 AppListControllerDelegate* 77 AppListViewDelegate* AppListServiceViews::GetViewDelegateForCreate() {
78 AppListServiceViews::GetControllerDelegateForCreate() { 78 return GetViewDelegate(shower_.profile());
79 return controller_delegate_.get();
80 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_views.h ('k') | chrome/browser/ui/app_list/app_list_shower_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698