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_host.h" | 5 #include "extensions/browser/extension_host.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 IPC_MESSAGE_UNHANDLED(handled = false) | 335 IPC_MESSAGE_UNHANDLED(handled = false) |
336 IPC_END_MESSAGE_MAP() | 336 IPC_END_MESSAGE_MAP() |
337 return handled; | 337 return handled; |
338 } | 338 } |
339 | 339 |
340 void ExtensionHost::OnRequest(const ExtensionHostMsg_Request_Params& params) { | 340 void ExtensionHost::OnRequest(const ExtensionHostMsg_Request_Params& params) { |
341 extension_function_dispatcher_.Dispatch(params, render_view_host()); | 341 extension_function_dispatcher_.Dispatch(params, render_view_host()); |
342 } | 342 } |
343 | 343 |
344 void ExtensionHost::OnEventAck() { | 344 void ExtensionHost::OnEventAck() { |
345 EventRouter* router = ExtensionSystem::Get(browser_context_)->event_router(); | 345 EventRouter* router = EventRouter::Get(browser_context_); |
346 if (router) | 346 if (router) |
347 router->OnEventAck(browser_context_, extension_id()); | 347 router->OnEventAck(browser_context_, extension_id()); |
348 } | 348 } |
349 | 349 |
350 void ExtensionHost::OnIncrementLazyKeepaliveCount() { | 350 void ExtensionHost::OnIncrementLazyKeepaliveCount() { |
351 ProcessManager* pm = ExtensionSystem::Get( | 351 ProcessManager* pm = ExtensionSystem::Get( |
352 browser_context_)->process_manager(); | 352 browser_context_)->process_manager(); |
353 if (pm) | 353 if (pm) |
354 pm->IncrementLazyKeepaliveCount(extension()); | 354 pm->IncrementLazyKeepaliveCount(extension()); |
355 } | 355 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 421 |
422 void ExtensionHost::RequestMediaAccessPermission( | 422 void ExtensionHost::RequestMediaAccessPermission( |
423 content::WebContents* web_contents, | 423 content::WebContents* web_contents, |
424 const content::MediaStreamRequest& request, | 424 const content::MediaStreamRequest& request, |
425 const content::MediaResponseCallback& callback) { | 425 const content::MediaResponseCallback& callback) { |
426 delegate_->ProcessMediaAccessRequest( | 426 delegate_->ProcessMediaAccessRequest( |
427 web_contents, request, callback, extension()); | 427 web_contents, request, callback, extension()); |
428 } | 428 } |
429 | 429 |
430 } // namespace extensions | 430 } // namespace extensions |
OLD | NEW |