OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_LAUNCHER_SEARCH_PROVIDE
R_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_LAUNCHER_SEARCH_PROVIDE
R_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_LAUNCHER_SEARCH_PROVIDE
R_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_LAUNCHER_SEARCH_PROVIDE
R_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const int query_id, | 60 const int query_id, |
61 const std::vector< | 61 const std::vector< |
62 extensions::api::launcher_search_provider::SearchResult>& results); | 62 extensions::api::launcher_search_provider::SearchResult>& results); |
63 | 63 |
64 // Returns true if there is a running query. | 64 // Returns true if there is a running query. |
65 bool IsQueryRunning() const; | 65 bool IsQueryRunning() const; |
66 | 66 |
67 // extensions::ExtensionRegistryObserver override. | 67 // extensions::ExtensionRegistryObserver override. |
68 void OnExtensionLoaded(content::BrowserContext* browser_context, | 68 void OnExtensionLoaded(content::BrowserContext* browser_context, |
69 const extensions::Extension* extension) override; | 69 const extensions::Extension* extension) override; |
70 void OnExtensionUnloaded( | 70 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
71 content::BrowserContext* browser_context, | 71 const extensions::Extension* extension, |
72 const extensions::Extension* extension, | 72 extensions::UnloadedExtensionReason reason) override; |
73 extensions::UnloadedExtensionInfo::Reason reason) override; | |
74 | 73 |
75 private: | 74 private: |
76 // Cache listener extension ids and set them to | 75 // Cache listener extension ids and set them to |
77 // |cached_listener_extension_ids_|. | 76 // |cached_listener_extension_ids_|. |
78 void CacheListenerExtensionIds(); | 77 void CacheListenerExtensionIds(); |
79 | 78 |
80 Profile* const profile_; | 79 Profile* const profile_; |
81 extensions::ExtensionRegistry* extension_registry_; | 80 extensions::ExtensionRegistry* extension_registry_; |
82 app_list::LauncherSearchProvider* provider_; | 81 app_list::LauncherSearchProvider* provider_; |
83 int query_id_; | 82 int query_id_; |
84 bool is_query_running_; | 83 bool is_query_running_; |
85 std::unique_ptr<std::set<extensions::ExtensionId>> | 84 std::unique_ptr<std::set<extensions::ExtensionId>> |
86 cached_listener_extension_ids_; | 85 cached_listener_extension_ids_; |
87 | 86 |
88 DISALLOW_COPY_AND_ASSIGN(Service); | 87 DISALLOW_COPY_AND_ASSIGN(Service); |
89 }; | 88 }; |
90 | 89 |
91 } // namespace launcher_search_provider | 90 } // namespace launcher_search_provider |
92 } // namespace chromeos | 91 } // namespace chromeos |
93 | 92 |
94 #endif // CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_LAUNCHER_SEARCH_PROV
IDER_SERVICE_H_ | 93 #endif // CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_LAUNCHER_SEARCH_PROV
IDER_SERVICE_H_ |
OLD | NEW |