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

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

Issue 1060733003: Support custom icon in search result. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 7 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
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 "base/memory/scoped_ptr.h"
9 #include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h"
8 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/extensions/api/launcher_search_provider.h" 11 #include "chrome/common/extensions/api/launcher_search_provider.h"
10 #include "components/keyed_service/core/keyed_service.h" 12 #include "components/keyed_service/core/keyed_service.h"
11 #include "content/public/browser/browser_context.h" 13 #include "content/public/browser/browser_context.h"
12 #include "extensions/browser/event_router.h" 14 #include "extensions/browser/event_router.h"
13 #include "extensions/common/extension.h" 15 #include "extensions/common/extension.h"
14 16
15 namespace app_list { 17 namespace app_list {
16 class LauncherSearchProvider; 18 class LauncherSearchProvider;
17 } // namespace app_list 19 } // namespace app_list
(...skipping 25 matching lines...) Expand all
43 // Dispatches onQueryEnded events to listener extensions. 45 // Dispatches onQueryEnded events to listener extensions.
44 void OnQueryEnded(); 46 void OnQueryEnded();
45 47
46 // Dispatches onOpenResult event of |item_id| to |extension_id|. 48 // Dispatches onOpenResult event of |item_id| to |extension_id|.
47 void OnOpenResult(const extensions::ExtensionId& extension_id, 49 void OnOpenResult(const extensions::ExtensionId& extension_id,
48 const std::string& item_id); 50 const std::string& item_id);
49 51
50 // Sets search results of a listener extension. 52 // Sets search results of a listener extension.
51 void SetSearchResults( 53 void SetSearchResults(
52 const extensions::Extension* extension, 54 const extensions::Extension* extension,
55 scoped_ptr<ErrorReporter> error_reporter,
53 const std::string& query_id, 56 const std::string& query_id,
54 const std::vector<linked_ptr< 57 const std::vector<linked_ptr<
55 extensions::api::launcher_search_provider::SearchResult>>& results); 58 extensions::api::launcher_search_provider::SearchResult>>& results);
56 59
57 // Returns true if there is a running query. 60 // Returns true if there is a running query.
58 bool IsQueryRunning() const; 61 bool IsQueryRunning() const;
59 62
60 private: 63 private:
61 // Returns extension ids of listener extensions. 64 // Returns extension ids of listener extensions.
62 std::set<extensions::ExtensionId> GetListenerExtensionIds(); 65 std::set<extensions::ExtensionId> GetListenerExtensionIds();
63 66
64 Profile* const profile_; 67 Profile* const profile_;
65 extensions::ExtensionRegistry* extension_registry_; 68 extensions::ExtensionRegistry* extension_registry_;
66 app_list::LauncherSearchProvider* provider_; 69 app_list::LauncherSearchProvider* provider_;
67 uint32 query_id_; 70 uint32 query_id_;
68 bool is_query_running_; 71 bool is_query_running_;
69 72
70 DISALLOW_COPY_AND_ASSIGN(Service); 73 DISALLOW_COPY_AND_ASSIGN(Service);
71 }; 74 };
72 75
73 } // namespace launcher_search_provider 76 } // namespace launcher_search_provider
74 } // namespace chromeos 77 } // namespace chromeos
75 78
76 #endif // CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_SERVICE_H_ 79 #endif // CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698