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

Side by Side Diff: chrome/browser/chromeos/launcher_search_provider/service.h

Issue 1043373002: Implement onQueryEnded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/launcher_search_provider/service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_SERVICE_H_
7 7
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "components/keyed_service/core/keyed_service.h" 9 #include "components/keyed_service/core/keyed_service.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 11 matching lines...) Expand all
22 // TODO(yawano): Implement opt-in control (crbug.com/440649). 22 // TODO(yawano): Implement opt-in control (crbug.com/440649).
23 class Service : public KeyedService { 23 class Service : public KeyedService {
24 public: 24 public:
25 Service(Profile* profile, extensions::ExtensionRegistry* extension_registry); 25 Service(Profile* profile, extensions::ExtensionRegistry* extension_registry);
26 ~Service() override; 26 ~Service() override;
27 static Service* Get(content::BrowserContext* context); 27 static Service* Get(content::BrowserContext* context);
28 28
29 // Dispatches onQueryStarted events to listener extensions. 29 // Dispatches onQueryStarted events to listener extensions.
30 void OnQueryStarted(const std::string& query, const int max_result); 30 void OnQueryStarted(const std::string& query, const int max_result);
31 31
32 // Dispatches onQueryEnded events to listener extensions.
33 void OnQueryEnded();
34
35 // Returns true if there is a running query.
36 bool IsQueryRunning() const;
37
32 private: 38 private:
33 // Returns extension ids of listener extensions. 39 // Returns extension ids of listener extensions.
34 std::set<extensions::ExtensionId> GetListenerExtensionIds(); 40 std::set<extensions::ExtensionId> GetListenerExtensionIds();
35 41
36 Profile* const profile_; 42 Profile* const profile_;
37 extensions::ExtensionRegistry* extension_registry_; 43 extensions::ExtensionRegistry* extension_registry_;
38 uint32 query_id_; 44 uint32 query_id_;
45 bool is_query_running_;
39 46
40 DISALLOW_COPY_AND_ASSIGN(Service); 47 DISALLOW_COPY_AND_ASSIGN(Service);
41 }; 48 };
42 49
43 } // namespace launcher_search_provider 50 } // namespace launcher_search_provider
44 } // namespace chromeos 51 } // namespace chromeos
45 52
46 #endif // CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_SERVICE_H_ 53 #endif // CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/launcher_search_provider/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698