OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 has_content_area_focus_ = has_focus; | 624 has_content_area_focus_ = has_focus; |
625 if (PluginHasFocus() != old_plugin_focus) { | 625 if (PluginHasFocus() != old_plugin_focus) { |
626 instance_interface_->DidChangeFocus(pp_instance(), | 626 instance_interface_->DidChangeFocus(pp_instance(), |
627 BoolToPPBool(PluginHasFocus())); | 627 BoolToPPBool(PluginHasFocus())); |
628 } | 628 } |
629 } | 629 } |
630 | 630 |
631 void PluginInstance::ViewInitiatedPaint() { | 631 void PluginInstance::ViewInitiatedPaint() { |
632 if (bound_graphics_2d()) | 632 if (bound_graphics_2d()) |
633 bound_graphics_2d()->ViewInitiatedPaint(); | 633 bound_graphics_2d()->ViewInitiatedPaint(); |
| 634 if (bound_graphics_3d()) |
| 635 bound_graphics_3d()->ViewInitiatedPaint(); |
634 } | 636 } |
635 | 637 |
636 void PluginInstance::ViewFlushedPaint() { | 638 void PluginInstance::ViewFlushedPaint() { |
637 if (bound_graphics_2d()) | 639 if (bound_graphics_2d()) |
638 bound_graphics_2d()->ViewFlushedPaint(); | 640 bound_graphics_2d()->ViewFlushedPaint(); |
| 641 if (bound_graphics_3d()) |
| 642 bound_graphics_3d()->ViewFlushedPaint(); |
639 } | 643 } |
640 | 644 |
641 bool PluginInstance::GetBitmapForOptimizedPluginPaint( | 645 bool PluginInstance::GetBitmapForOptimizedPluginPaint( |
642 const gfx::Rect& paint_bounds, | 646 const gfx::Rect& paint_bounds, |
643 TransportDIB** dib, | 647 TransportDIB** dib, |
644 gfx::Rect* location, | 648 gfx::Rect* location, |
645 gfx::Rect* clip) { | 649 gfx::Rect* clip) { |
646 if (!always_on_top_) | 650 if (!always_on_top_) |
647 return false; | 651 return false; |
648 if (!bound_graphics_2d() || !bound_graphics_2d()->is_always_opaque()) | 652 if (!bound_graphics_2d() || !bound_graphics_2d()->is_always_opaque()) |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 PPB_Surface3D_Impl* PluginInstance::bound_graphics_3d() const { | 1173 PPB_Surface3D_Impl* PluginInstance::bound_graphics_3d() const { |
1170 if (bound_graphics_.get() == NULL) | 1174 if (bound_graphics_.get() == NULL) |
1171 return NULL; | 1175 return NULL; |
1172 | 1176 |
1173 return bound_graphics_->Cast<PPB_Surface3D_Impl>(); | 1177 return bound_graphics_->Cast<PPB_Surface3D_Impl>(); |
1174 } | 1178 } |
1175 | 1179 |
1176 } // namespace ppapi | 1180 } // namespace ppapi |
1177 } // namespace webkit | 1181 } // namespace webkit |
1178 | 1182 |
OLD | NEW |