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

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

Issue 11094019: Auto hide app list on Windows when it loses focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/apps_model_builder.h" 5 #include "chrome/browser/ui/app_list/apps_model_builder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/extensions/extension_prefs.h" 10 #include "chrome/browser/extensions/extension_prefs.h"
(...skipping 20 matching lines...) Expand all
31 if (page1.Equals(page2)) 31 if (page1.Equals(page2))
32 return app1->GetAppLaunchOrdinal().LessThan(app2->GetAppLaunchOrdinal()); 32 return app1->GetAppLaunchOrdinal().LessThan(app2->GetAppLaunchOrdinal());
33 33
34 return false; 34 return false;
35 } 35 }
36 36
37 } // namespace 37 } // namespace
38 38
39 AppsModelBuilder::AppsModelBuilder(Profile* profile, 39 AppsModelBuilder::AppsModelBuilder(Profile* profile,
40 app_list::AppListModel::Apps* model, 40 app_list::AppListModel::Apps* model,
41 AppListController* controller) 41 AppListControllerDelegate* controller)
42 : profile_(profile), 42 : profile_(profile),
43 controller_(controller), 43 controller_(controller),
44 model_(model) { 44 model_(model) {
45 extensions::ExtensionPrefs* extension_prefs = 45 extensions::ExtensionPrefs* extension_prefs =
46 profile_->GetExtensionService()->extension_prefs(); 46 profile_->GetExtensionService()->extension_prefs();
47 47
48 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 48 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
49 content::Source<Profile>(profile_)); 49 content::Source<Profile>(profile_));
50 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 50 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
51 content::Source<Profile>(profile_)); 51 content::Source<Profile>(profile_));
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 break; 217 break;
218 } 218 }
219 case chrome::NOTIFICATION_PREF_CHANGED: { 219 case chrome::NOTIFICATION_PREF_CHANGED: {
220 ResortApps(); 220 ResortApps();
221 break; 221 break;
222 } 222 }
223 default: 223 default:
224 NOTREACHED(); 224 NOTREACHED();
225 } 225 }
226 } 226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698