OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin/webplugin_proxy.h" | 5 #include "content/plugin/webplugin_proxy.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/scoped_handle.h" | 10 #include "base/scoped_handle.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 int ack_key | 405 int ack_key |
406 #endif | 406 #endif |
407 ) { | 407 ) { |
408 gfx::Rect old = delegate_->GetRect(); | 408 gfx::Rect old = delegate_->GetRect(); |
409 gfx::Rect old_clip_rect = delegate_->GetClipRect(); | 409 gfx::Rect old_clip_rect = delegate_->GetClipRect(); |
410 transparent_ = transparent; | 410 transparent_ = transparent; |
411 | 411 |
412 // Update the buffers before doing anything that could call into plugin code, | 412 // Update the buffers before doing anything that could call into plugin code, |
413 // so that we don't process buffer changes out of order if plugins make | 413 // so that we don't process buffer changes out of order if plugins make |
414 // synchronous calls that lead to nested UpdateGeometry calls. | 414 // synchronous calls that lead to nested UpdateGeometry calls. |
415 if (TransportDIB::is_valid(windowless_buffer)) { | 415 if (TransportDIB::is_valid_handle(windowless_buffer)) { |
416 // The plugin's rect changed, so now we have a new buffer to draw into. | 416 // The plugin's rect changed, so now we have a new buffer to draw into. |
417 SetWindowlessBuffer(windowless_buffer, background_buffer, window_rect); | 417 SetWindowlessBuffer(windowless_buffer, background_buffer, window_rect); |
418 } | 418 } |
419 | 419 |
420 #if defined(OS_MACOSX) | 420 #if defined(OS_MACOSX) |
421 delegate_->UpdateGeometryAndContext(window_rect, clip_rect, | 421 delegate_->UpdateGeometryAndContext(window_rect, clip_rect, |
422 windowless_context_); | 422 windowless_context_); |
423 #else | 423 #else |
424 delegate_->UpdateGeometry(window_rect, clip_rect); | 424 delegate_->UpdateGeometry(window_rect, clip_rect); |
425 #endif | 425 #endif |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 resource_clients_.erase(index++); | 647 resource_clients_.erase(index++); |
648 } else { | 648 } else { |
649 index++; | 649 index++; |
650 } | 650 } |
651 } | 651 } |
652 } | 652 } |
653 | 653 |
654 void WebPluginProxy::URLRedirectResponse(bool allow, int resource_id) { | 654 void WebPluginProxy::URLRedirectResponse(bool allow, int resource_id) { |
655 Send(new PluginHostMsg_URLRedirectResponse(route_id_, allow, resource_id)); | 655 Send(new PluginHostMsg_URLRedirectResponse(route_id_, allow, resource_id)); |
656 } | 656 } |
OLD | NEW |