| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 DCHECK(texture_id_1 == 0); | 346 DCHECK(texture_id_1 == 0); |
| 347 return; | 347 return; |
| 348 } | 348 } |
| 349 | 349 |
| 350 DCHECK(texture_id_1 != 0); | 350 DCHECK(texture_id_1 != 0); |
| 351 DCHECK(texture_id_0 != texture_id_1); | 351 DCHECK(texture_id_0 != texture_id_1); |
| 352 | 352 |
| 353 surface_handle_ = gfx::GLSurfaceHandle(gfx::kNullPluginWindow, true); | 353 surface_handle_ = gfx::GLSurfaceHandle(gfx::kNullPluginWindow, true); |
| 354 surface_handle_.parent_gpu_process_id = gpu_process_id; | 354 surface_handle_.parent_gpu_process_id = gpu_process_id; |
| 355 surface_handle_.parent_client_id = client_id; | 355 surface_handle_.parent_client_id = client_id; |
| 356 surface_handle_.parent_context_id = context_id; |
| 357 surface_handle_.parent_texture_id[0] = texture_id_0; |
| 358 surface_handle_.parent_texture_id[1] = texture_id_1; |
| 359 surface_handle_.sync_point = sync_point; |
| 356 } | 360 } |
| 357 | 361 |
| 358 bool BrowserPluginGuest::InAutoSizeBounds(const gfx::Size& size) const { | 362 bool BrowserPluginGuest::InAutoSizeBounds(const gfx::Size& size) const { |
| 359 return size.width() <= max_auto_size_.width() && | 363 return size.width() <= max_auto_size_.width() && |
| 360 size.height() <= max_auto_size_.height(); | 364 size.height() <= max_auto_size_.height(); |
| 361 } | 365 } |
| 362 | 366 |
| 363 void BrowserPluginGuest::UpdateRect( | 367 void BrowserPluginGuest::UpdateRect( |
| 364 RenderViewHost* render_view_host, | 368 RenderViewHost* render_view_host, |
| 365 const ViewHostMsg_UpdateRect_Params& params) { | 369 const ViewHostMsg_UpdateRect_Params& params) { |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 default: | 655 default: |
| 652 break; | 656 break; |
| 653 } | 657 } |
| 654 } | 658 } |
| 655 | 659 |
| 656 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { | 660 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { |
| 657 embedder_web_contents_->Send(msg); | 661 embedder_web_contents_->Send(msg); |
| 658 } | 662 } |
| 659 | 663 |
| 660 } // namespace content | 664 } // namespace content |
| OLD | NEW |