| 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/webplugin_delegate_proxy.h" | 5 #include "content/renderer/webplugin_delegate_proxy.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #elif defined(USE_X11) | 9 #elif defined(USE_X11) |
| 10 #include <cairo/cairo.h> | 10 #include <cairo/cairo.h> |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 | 750 |
| 751 if (!uses_shared_bitmaps_) | 751 if (!uses_shared_bitmaps_) |
| 752 return; | 752 return; |
| 753 | 753 |
| 754 // We got a paint before the plugin's coordinates, so there's no buffer to | 754 // We got a paint before the plugin's coordinates, so there's no buffer to |
| 755 // copy from. | 755 // copy from. |
| 756 if (!front_buffer_canvas()) | 756 if (!front_buffer_canvas()) |
| 757 return; | 757 return; |
| 758 | 758 |
| 759 // We're using the native OS APIs from here on out. | 759 // We're using the native OS APIs from here on out. |
| 760 if (!skia::SupportsPlatformPaint(canvas)) { | 760 if (!skia::PlatformPaintSupport(canvas)) { |
| 761 // TODO(alokp): Implement this path. | 761 // TODO(alokp): Implement this path. |
| 762 // This block will only get hit with --enable-accelerated-drawing flag. | 762 // This block will only get hit with --enable-accelerated-drawing flag. |
| 763 // With accelerated canvas, we do not have a bitmap that can be provided | 763 // With accelerated canvas, we do not have a bitmap that can be provided |
| 764 // to the plugin for compositing. We may have to implement a solution | 764 // to the plugin for compositing. We may have to implement a solution |
| 765 // described in crbug.com/12586. | 765 // described in crbug.com/12586. |
| 766 DLOG(WARNING) << "Could not paint plugin"; | 766 DLOG(WARNING) << "Could not paint plugin"; |
| 767 return; | 767 return; |
| 768 } | 768 } |
| 769 skia::ScopedPlatformPaint scoped_platform_paint(canvas); | 769 skia::ScopedPlatformPaint scoped_platform_paint(canvas); |
| 770 gfx::NativeDrawingContext context = | 770 gfx::NativeDrawingContext context = |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 } | 1527 } |
| 1528 #endif | 1528 #endif |
| 1529 | 1529 |
| 1530 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1530 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
| 1531 int resource_id) { | 1531 int resource_id) { |
| 1532 if (!plugin_) | 1532 if (!plugin_) |
| 1533 return; | 1533 return; |
| 1534 | 1534 |
| 1535 plugin_->URLRedirectResponse(allow, resource_id); | 1535 plugin_->URLRedirectResponse(allow, resource_id); |
| 1536 } | 1536 } |
| OLD | NEW |