| 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 "base/bind_helpers.h" | 5 #include "base/bind_helpers.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 void RenderWidgetHostViewGuest::SetSize(const gfx::Size& size) { | 57 void RenderWidgetHostViewGuest::SetSize(const gfx::Size& size) { |
| 58 platform_view_->SetSize(size); | 58 platform_view_->SetSize(size); |
| 59 } | 59 } |
| 60 | 60 |
| 61 gfx::Rect RenderWidgetHostViewGuest::GetBoundsInRootWindow() { | 61 gfx::Rect RenderWidgetHostViewGuest::GetBoundsInRootWindow() { |
| 62 return platform_view_->GetBoundsInRootWindow(); | 62 return platform_view_->GetBoundsInRootWindow(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 gfx::GLSurfaceHandle RenderWidgetHostViewGuest::GetCompositingSurface() { | 65 gfx::GLSurfaceHandle RenderWidgetHostViewGuest::GetCompositingSurface() { |
| 66 return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT); | 66 return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, |
| 67 gfx::TEXTURE_TRANSPORT_NO_PARTIAL_SWAP); |
| 67 } | 68 } |
| 68 | 69 |
| 69 void RenderWidgetHostViewGuest::Show() { | 70 void RenderWidgetHostViewGuest::Show() { |
| 70 WasShown(); | 71 WasShown(); |
| 71 } | 72 } |
| 72 | 73 |
| 73 void RenderWidgetHostViewGuest::Hide() { | 74 void RenderWidgetHostViewGuest::Hide() { |
| 74 WasHidden(); | 75 WasHidden(); |
| 75 } | 76 } |
| 76 | 77 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 params.size, | 115 params.size, |
| 115 params.mailbox_name, | 116 params.mailbox_name, |
| 116 params.route_id, | 117 params.route_id, |
| 117 gpu_host_id)); | 118 gpu_host_id)); |
| 118 } | 119 } |
| 119 } | 120 } |
| 120 | 121 |
| 121 void RenderWidgetHostViewGuest::AcceleratedSurfacePostSubBuffer( | 122 void RenderWidgetHostViewGuest::AcceleratedSurfacePostSubBuffer( |
| 122 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 123 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
| 123 int gpu_host_id) { | 124 int gpu_host_id) { |
| 124 DCHECK(enable_compositing_); | 125 NOTREACHED(); |
| 125 if (enable_compositing_) { | |
| 126 guest_->SendMessageToEmbedder( | |
| 127 new BrowserPluginMsg_BuffersSwapped( | |
| 128 guest_->instance_id(), | |
| 129 params.surface_size, | |
| 130 params.mailbox_name, | |
| 131 params.route_id, | |
| 132 gpu_host_id)); | |
| 133 } | |
| 134 } | 126 } |
| 135 | 127 |
| 136 void RenderWidgetHostViewGuest::SetBounds(const gfx::Rect& rect) { | 128 void RenderWidgetHostViewGuest::SetBounds(const gfx::Rect& rect) { |
| 137 platform_view_->SetBounds(rect); | 129 platform_view_->SetBounds(rect); |
| 138 } | 130 } |
| 139 | 131 |
| 140 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) { | 132 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) { |
| 141 return platform_view_->OnMessageReceived(msg); | 133 return platform_view_->OnMessageReceived(msg); |
| 142 } | 134 } |
| 143 | 135 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 void RenderWidgetHostViewGuest::WillWmDestroy() { | 385 void RenderWidgetHostViewGuest::WillWmDestroy() { |
| 394 } | 386 } |
| 395 #endif | 387 #endif |
| 396 | 388 |
| 397 void RenderWidgetHostViewGuest::DestroyGuestView() { | 389 void RenderWidgetHostViewGuest::DestroyGuestView() { |
| 398 host_ = NULL; | 390 host_ = NULL; |
| 399 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 391 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 400 } | 392 } |
| 401 | 393 |
| 402 } // namespace content | 394 } // namespace content |
| OLD | NEW |