| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/extension_message_filter.h" | 5 #include "extensions/browser/extension_message_filter.h" |
| 6 | 6 |
| 7 #include "components/crx_file/id_util.h" | 7 #include "components/crx_file/id_util.h" |
| 8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/render_frame_host.h" | 9 #include "content/public/browser/render_frame_host.h" |
| 10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return; | 243 return; |
| 244 EventRouter* router = EventRouter::Get(browser_context_); | 244 EventRouter* router = EventRouter::Get(browser_context_); |
| 245 if (!router) | 245 if (!router) |
| 246 return; | 246 return; |
| 247 router->RemoveFilteredEventListener( | 247 router->RemoveFilteredEventListener( |
| 248 event_name, process, extension_id, filter, lazy); | 248 event_name, process, extension_id, filter, lazy); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void ExtensionMessageFilter::OnExtensionShouldSuspendAck( | 251 void ExtensionMessageFilter::OnExtensionShouldSuspendAck( |
| 252 const std::string& extension_id, int sequence_id) { | 252 const std::string& extension_id, int sequence_id) { |
| 253 ProcessManager* process_manager = | 253 ProcessManager::Get(browser_context_) |
| 254 ExtensionSystem::Get(browser_context_)->process_manager(); | 254 ->OnShouldSuspendAck(extension_id, sequence_id); |
| 255 if (process_manager) | |
| 256 process_manager->OnShouldSuspendAck(extension_id, sequence_id); | |
| 257 } | 255 } |
| 258 | 256 |
| 259 void ExtensionMessageFilter::OnExtensionSuspendAck( | 257 void ExtensionMessageFilter::OnExtensionSuspendAck( |
| 260 const std::string& extension_id) { | 258 const std::string& extension_id) { |
| 261 ProcessManager* process_manager = | 259 ProcessManager::Get(browser_context_)->OnSuspendAck(extension_id); |
| 262 ExtensionSystem::Get(browser_context_)->process_manager(); | |
| 263 if (process_manager) | |
| 264 process_manager->OnSuspendAck(extension_id); | |
| 265 } | 260 } |
| 266 | 261 |
| 267 void ExtensionMessageFilter::OnExtensionTransferBlobsAck( | 262 void ExtensionMessageFilter::OnExtensionTransferBlobsAck( |
| 268 const std::vector<std::string>& blob_uuids) { | 263 const std::vector<std::string>& blob_uuids) { |
| 269 RenderProcessHost* process = RenderProcessHost::FromID(render_process_id_); | 264 RenderProcessHost* process = RenderProcessHost::FromID(render_process_id_); |
| 270 if (!process) | 265 if (!process) |
| 271 return; | 266 return; |
| 272 BlobHolder::FromRenderProcessHost(process)->DropBlobs(blob_uuids); | 267 BlobHolder::FromRenderProcessHost(process)->DropBlobs(blob_uuids); |
| 273 } | 268 } |
| 274 | 269 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 guest_instance_id, | 320 guest_instance_id, |
| 326 attach_params); | 321 attach_params); |
| 327 | 322 |
| 328 IPC::Message* msg = | 323 IPC::Message* msg = |
| 329 new ExtensionMsg_CreateMimeHandlerViewGuestACK(element_instance_id); | 324 new ExtensionMsg_CreateMimeHandlerViewGuestACK(element_instance_id); |
| 330 msg->set_routing_id(rfh->GetRoutingID()); | 325 msg->set_routing_id(rfh->GetRoutingID()); |
| 331 rfh->Send(msg); | 326 rfh->Send(msg); |
| 332 } | 327 } |
| 333 | 328 |
| 334 } // namespace extensions | 329 } // namespace extensions |
| OLD | NEW |