Chromium Code Reviews| Index: chrome/browser/chromeos/launcher_search_provider/service.cc |
| diff --git a/chrome/browser/chromeos/launcher_search_provider/service.cc b/chrome/browser/chromeos/launcher_search_provider/service.cc |
| index bf4d130ed2e17679457568cb94332f6ab4d9116a..e06fc5e45938cd4d733ff56d7167312c17b8e5ee 100644 |
| --- a/chrome/browser/chromeos/launcher_search_provider/service.cc |
| +++ b/chrome/browser/chromeos/launcher_search_provider/service.cc |
| @@ -84,6 +84,22 @@ void Service::OnQueryEnded() { |
| is_query_running_ = false; |
| } |
| +void Service::OnOpenResult(const ExtensionId& extension_id, |
| + const std::string& item_id) { |
| + // If |extension| is not contained in listener extension, ignore it. |
| + std::set<ExtensionId> extension_ids = GetListenerExtensionIds(); |
| + if (!ContainsValue(extension_ids, extension_id)) |
|
Matt Giuca
2015/04/20 02:44:52
Is there any reason to expect this to happen durin
yawano
2015/04/20 04:02:36
Yes, this could not happen since extension_id is s
Matt Giuca
2015/04/20 04:36:26
I think it should be a CHECK because it would be a
yawano
2015/04/20 04:46:22
Done.
|
| + return; |
| + |
| + extensions::EventRouter* event_router = |
| + extensions::EventRouter::Get(profile_); |
| + event_router->DispatchEventToExtension( |
| + extension_id, |
| + make_scoped_ptr(new extensions::Event( |
| + api_launcher_search_provider::OnOpenResult::kEventName, |
| + api_launcher_search_provider::OnOpenResult::Create(item_id)))); |
| +} |
| + |
| void Service::SetSearchResults( |
| const extensions::Extension* extension, |
| const std::string& query_id, |