| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <algorithm> | 9 #include <algorithm> |
| 8 | 10 |
| 11 #include "base/macros.h" |
| 9 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 10 #include "base/pickle.h" | 13 #include "base/pickle.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "build/build_config.h" |
| 12 #include "cc/surfaces/surface.h" | 16 #include "cc/surfaces/surface.h" |
| 13 #include "cc/surfaces/surface_manager.h" | 17 #include "cc/surfaces/surface_manager.h" |
| 14 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 18 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| 15 #include "content/browser/browser_thread_impl.h" | 19 #include "content/browser/browser_thread_impl.h" |
| 16 #include "content/browser/child_process_security_policy_impl.h" | 20 #include "content/browser/child_process_security_policy_impl.h" |
| 17 #include "content/browser/compositor/surface_utils.h" | 21 #include "content/browser/compositor/surface_utils.h" |
| 18 #include "content/browser/frame_host/render_frame_host_impl.h" | 22 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 19 #include "content/browser/frame_host/render_frame_proxy_host.h" | 23 #include "content/browser/frame_host/render_frame_proxy_host.h" |
| 20 #include "content/browser/frame_host/render_widget_host_view_guest.h" | 24 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
| 21 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 25 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 393 } |
| 390 | 394 |
| 391 void BrowserPluginGuest::PointerLockPermissionResponse(bool allow) { | 395 void BrowserPluginGuest::PointerLockPermissionResponse(bool allow) { |
| 392 SendMessageToEmbedder( | 396 SendMessageToEmbedder( |
| 393 new BrowserPluginMsg_SetMouseLock(browser_plugin_instance_id(), allow)); | 397 new BrowserPluginMsg_SetMouseLock(browser_plugin_instance_id(), allow)); |
| 394 } | 398 } |
| 395 | 399 |
| 396 // TODO(wjmaclean): Remove this once any remaining users of this pathway | 400 // TODO(wjmaclean): Remove this once any remaining users of this pathway |
| 397 // are gone. | 401 // are gone. |
| 398 void BrowserPluginGuest::SwapCompositorFrame( | 402 void BrowserPluginGuest::SwapCompositorFrame( |
| 399 uint32 output_surface_id, | 403 uint32_t output_surface_id, |
| 400 int host_process_id, | 404 int host_process_id, |
| 401 int host_routing_id, | 405 int host_routing_id, |
| 402 scoped_ptr<cc::CompositorFrame> frame) { | 406 scoped_ptr<cc::CompositorFrame> frame) { |
| 403 last_pending_frame_.reset(new FrameMsg_CompositorFrameSwapped_Params()); | 407 last_pending_frame_.reset(new FrameMsg_CompositorFrameSwapped_Params()); |
| 404 frame->AssignTo(&last_pending_frame_->frame); | 408 frame->AssignTo(&last_pending_frame_->frame); |
| 405 last_pending_frame_->output_surface_id = output_surface_id; | 409 last_pending_frame_->output_surface_id = output_surface_id; |
| 406 last_pending_frame_->producing_route_id = host_routing_id; | 410 last_pending_frame_->producing_route_id = host_routing_id; |
| 407 last_pending_frame_->producing_host_id = host_process_id; | 411 last_pending_frame_->producing_host_id = host_process_id; |
| 408 | 412 |
| 409 SendMessageToEmbedder( | 413 SendMessageToEmbedder( |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 range, character_bounds); | 1063 range, character_bounds); |
| 1060 } | 1064 } |
| 1061 #endif | 1065 #endif |
| 1062 | 1066 |
| 1063 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1067 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
| 1064 if (delegate_) | 1068 if (delegate_) |
| 1065 delegate_->SetContextMenuPosition(position); | 1069 delegate_->SetContextMenuPosition(position); |
| 1066 } | 1070 } |
| 1067 | 1071 |
| 1068 } // namespace content | 1072 } // namespace content |
| OLD | NEW |