| 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/renderer/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1694 | 1694 |
| 1695 sent_initial_did_change_view_ = true; | 1695 sent_initial_did_change_view_ = true; |
| 1696 last_sent_view_data_ = view_data_; | 1696 last_sent_view_data_ = view_data_; |
| 1697 ScopedPPResource resource( | 1697 ScopedPPResource resource( |
| 1698 ScopedPPResource::PassRef(), | 1698 ScopedPPResource::PassRef(), |
| 1699 (new PPB_View_Shared(ppapi::OBJECT_IS_IMPL, pp_instance(), view_data_)) | 1699 (new PPB_View_Shared(ppapi::OBJECT_IS_IMPL, pp_instance(), view_data_)) |
| 1700 ->GetReference()); | 1700 ->GetReference()); |
| 1701 | 1701 |
| 1702 UpdateLayerTransform(); | 1702 UpdateLayerTransform(); |
| 1703 | 1703 |
| 1704 if (bound_graphics_2d_platform_ && |
| 1705 (!view_data_.is_page_visible || |
| 1706 PP_ToGfxRect(view_data_.clip_rect).IsEmpty())) { |
| 1707 bound_graphics_2d_platform_->ClearCache(); |
| 1708 } |
| 1709 |
| 1704 // It's possible that Delete() has been called but the renderer hasn't | 1710 // It's possible that Delete() has been called but the renderer hasn't |
| 1705 // released its reference to this object yet. | 1711 // released its reference to this object yet. |
| 1706 if (instance_interface_) { | 1712 if (instance_interface_) { |
| 1707 instance_interface_->DidChangeView( | 1713 instance_interface_->DidChangeView( |
| 1708 pp_instance(), resource, &view_data_.rect, &view_data_.clip_rect); | 1714 pp_instance(), resource, &view_data_.rect, &view_data_.clip_rect); |
| 1709 } | 1715 } |
| 1710 } | 1716 } |
| 1711 | 1717 |
| 1712 void PepperPluginInstanceImpl::ReportGeometry() { | 1718 void PepperPluginInstanceImpl::ReportGeometry() { |
| 1713 // If this call was delayed, we may have transitioned back to fullscreen in | 1719 // If this call was delayed, we may have transitioned back to fullscreen in |
| (...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3377 // Running out-of-process. Initiate an IPC call to notify the plugin | 3383 // Running out-of-process. Initiate an IPC call to notify the plugin |
| 3378 // process. | 3384 // process. |
| 3379 ppapi::proxy::HostDispatcher* dispatcher = | 3385 ppapi::proxy::HostDispatcher* dispatcher = |
| 3380 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3386 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
| 3381 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3387 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
| 3382 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3388 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
| 3383 } | 3389 } |
| 3384 } | 3390 } |
| 3385 | 3391 |
| 3386 } // namespace content | 3392 } // namespace content |
| OLD | NEW |