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

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

Issue 2143893002: Purge the App Launcher code from Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comment Created 4 years, 4 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_shower_views.h" 5 #include "chrome/browser/ui/app_list/app_list_shower_views.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/profiler/scoped_tracker.h" 9 #include "base/profiler/scoped_tracker.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // correctly been destroyed before ending the keep alive so that 91 // correctly been destroyed before ending the keep alive so that
92 // CloseAllSecondaryWidgets() won't attempt to delete the AppList's Widget 92 // CloseAllSecondaryWidgets() won't attempt to delete the AppList's Widget
93 // again. 93 // again.
94 ResetKeepAliveSoon(); 94 ResetKeepAliveSoon();
95 } 95 }
96 96
97 bool AppListShower::IsAppListVisible() const { 97 bool AppListShower::IsAppListVisible() const {
98 return app_list_ && app_list_->GetWidget()->IsVisible(); 98 return app_list_ && app_list_->GetWidget()->IsVisible();
99 } 99 }
100 100
101 void AppListShower::WarmupForProfile(Profile* profile) {
102 DCHECK(!profile_);
103 CreateViewForProfile(profile);
104 app_list_->Prerender();
105 }
106
107 bool AppListShower::HasView() const { 101 bool AppListShower::HasView() const {
108 return !!app_list_; 102 return !!app_list_;
109 } 103 }
110 104
111 app_list::AppListView* AppListShower::MakeViewForCurrentProfile() { 105 app_list::AppListView* AppListShower::MakeViewForCurrentProfile() {
112 app_list::AppListView* view; 106 app_list::AppListView* view;
113 { 107 {
114 // TODO(tapted): Remove ScopedTracker below once crbug.com/431326 is fixed. 108 // TODO(tapted): Remove ScopedTracker below once crbug.com/431326 is fixed.
115 tracked_objects::ScopedTracker tracking_profile1( 109 tracked_objects::ScopedTracker tracking_profile1(
116 FROM_HERE_WITH_EXPLICIT_FUNCTION("431326 AppListView()")); 110 FROM_HERE_WITH_EXPLICIT_FUNCTION("431326 AppListView()"));
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 FROM_HERE, 145 FROM_HERE,
152 base::Bind(&AppListShower::ResetKeepAlive, base::Unretained(this))); 146 base::Bind(&AppListShower::ResetKeepAlive, base::Unretained(this)));
153 return; 147 return;
154 } 148 }
155 ResetKeepAlive(); 149 ResetKeepAlive();
156 } 150 }
157 151
158 void AppListShower::ResetKeepAlive() { 152 void AppListShower::ResetKeepAlive() {
159 keep_alive_.reset(); 153 keep_alive_.reset();
160 } 154 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698