| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2469 | 2469 |
| 2470 AssociatedInterfaceRegistry* | 2470 AssociatedInterfaceRegistry* |
| 2471 RenderFrameImpl::GetAssociatedInterfaceRegistry() { | 2471 RenderFrameImpl::GetAssociatedInterfaceRegistry() { |
| 2472 return &associated_interfaces_; | 2472 return &associated_interfaces_; |
| 2473 } | 2473 } |
| 2474 | 2474 |
| 2475 AssociatedInterfaceProvider* | 2475 AssociatedInterfaceProvider* |
| 2476 RenderFrameImpl::GetRemoteAssociatedInterfaces() { | 2476 RenderFrameImpl::GetRemoteAssociatedInterfaces() { |
| 2477 if (!remote_associated_interfaces_) { | 2477 if (!remote_associated_interfaces_) { |
| 2478 ChildThreadImpl* thread = ChildThreadImpl::current(); | 2478 ChildThreadImpl* thread = ChildThreadImpl::current(); |
| 2479 mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces; | 2479 if (thread) { |
| 2480 thread->GetRemoteRouteProvider()->GetRoute( | 2480 mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces; |
| 2481 routing_id_, | 2481 thread->GetRemoteRouteProvider()->GetRoute( |
| 2482 mojo::GetProxy(&remote_interfaces, | 2482 routing_id_, mojo::GetProxy(&remote_interfaces, |
| 2483 thread->channel()->GetAssociatedGroup())); | 2483 thread->channel()->GetAssociatedGroup())); |
| 2484 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( | 2484 remote_associated_interfaces_.reset( |
| 2485 std::move(remote_interfaces))); | 2485 new AssociatedInterfaceProviderImpl(std::move(remote_interfaces))); |
| 2486 } else { |
| 2487 // In some tests the thread may be null, |
| 2488 // so set up a self-contained interface provider instead. |
| 2489 remote_associated_interfaces_.reset( |
| 2490 new AssociatedInterfaceProviderImpl()); |
| 2491 } |
| 2486 } | 2492 } |
| 2487 return remote_associated_interfaces_.get(); | 2493 return remote_associated_interfaces_.get(); |
| 2488 } | 2494 } |
| 2489 | 2495 |
| 2490 #if defined(ENABLE_PLUGINS) | 2496 #if defined(ENABLE_PLUGINS) |
| 2491 void RenderFrameImpl::RegisterPeripheralPlugin( | 2497 void RenderFrameImpl::RegisterPeripheralPlugin( |
| 2492 const url::Origin& content_origin, | 2498 const url::Origin& content_origin, |
| 2493 const base::Closure& unthrottle_callback) { | 2499 const base::Closure& unthrottle_callback) { |
| 2494 return plugin_power_saver_helper_->RegisterPeripheralPlugin( | 2500 return plugin_power_saver_helper_->RegisterPeripheralPlugin( |
| 2495 content_origin, unthrottle_callback); | 2501 content_origin, unthrottle_callback); |
| (...skipping 3988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6484 // event target. Potentially a Pepper plugin will receive the event. | 6490 // event target. Potentially a Pepper plugin will receive the event. |
| 6485 // In order to tell whether a plugin gets the last mouse event and which it | 6491 // In order to tell whether a plugin gets the last mouse event and which it |
| 6486 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6492 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6487 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6493 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6488 // |pepper_last_mouse_event_target_|. | 6494 // |pepper_last_mouse_event_target_|. |
| 6489 pepper_last_mouse_event_target_ = nullptr; | 6495 pepper_last_mouse_event_target_ = nullptr; |
| 6490 #endif | 6496 #endif |
| 6491 } | 6497 } |
| 6492 | 6498 |
| 6493 } // namespace content | 6499 } // namespace content |
| OLD | NEW |