| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |