| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/search/app_search_provider.h" | 5 #include "chrome/browser/ui/app_list/search/app_search_provider.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 TokenizedString indexed_name_; | 41 TokenizedString indexed_name_; |
| 42 | 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(App); | 43 DISALLOW_COPY_AND_ASSIGN(App); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 AppSearchProvider::AppSearchProvider( | 46 AppSearchProvider::AppSearchProvider( |
| 47 Profile* profile, | 47 Profile* profile, |
| 48 AppListControllerDelegate* list_controller) | 48 AppListControllerDelegate* list_controller) |
| 49 : profile_(profile), | 49 : profile_(profile), |
| 50 list_controller_(list_controller) { | 50 list_controller_(list_controller) { |
| 51 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 51 registrar_.Add(this, |
| 52 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, |
| 52 content::Source<Profile>(profile_->GetOriginalProfile())); | 53 content::Source<Profile>(profile_->GetOriginalProfile())); |
| 53 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, | 54 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, |
| 54 content::Source<Profile>(profile_->GetOriginalProfile())); | 55 content::Source<Profile>(profile_->GetOriginalProfile())); |
| 55 RefreshApps(); | 56 RefreshApps(); |
| 56 } | 57 } |
| 57 | 58 |
| 58 AppSearchProvider::~AppSearchProvider() {} | 59 AppSearchProvider::~AppSearchProvider() {} |
| 59 | 60 |
| 60 void AppSearchProvider::Start(const base::string16& query) { | 61 void AppSearchProvider::Start(const base::string16& query) { |
| 61 const TokenizedString query_terms(query); | 62 const TokenizedString query_terms(query); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 AddApps(registry->terminated_extensions()); | 102 AddApps(registry->terminated_extensions()); |
| 102 } | 103 } |
| 103 | 104 |
| 104 void AppSearchProvider::Observe(int type, | 105 void AppSearchProvider::Observe(int type, |
| 105 const content::NotificationSource& source, | 106 const content::NotificationSource& source, |
| 106 const content::NotificationDetails& detaila) { | 107 const content::NotificationDetails& detaila) { |
| 107 RefreshApps(); | 108 RefreshApps(); |
| 108 } | 109 } |
| 109 | 110 |
| 110 } // namespace app_list | 111 } // namespace app_list |
| OLD | NEW |