| 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/renderer/webplugin_delegate_proxy.h" | 5 #include "content/renderer/webplugin_delegate_proxy.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 int bytes_per_pixel = CGBitmapContextGetBitsPerPixel(context) / 8; | 861 int bytes_per_pixel = CGBitmapContextGetBitsPerPixel(context) / 8; |
| 862 #else | 862 #else |
| 863 cairo_surface_flush(page_surface); | 863 cairo_surface_flush(page_surface); |
| 864 const unsigned char* page_bytes = cairo_image_surface_get_data(page_surface); | 864 const unsigned char* page_bytes = cairo_image_surface_get_data(page_surface); |
| 865 int page_stride = cairo_image_surface_get_stride(page_surface); | 865 int page_stride = cairo_image_surface_get_stride(page_surface); |
| 866 int page_start_x = static_cast<int>(page_x_double); | 866 int page_start_x = static_cast<int>(page_x_double); |
| 867 int page_start_y = static_cast<int>(page_y_double); | 867 int page_start_y = static_cast<int>(page_y_double); |
| 868 | 868 |
| 869 skia::PlatformDevice& device = | 869 skia::PlatformDevice& device = |
| 870 background_store_canvas_->getTopPlatformDevice(); | 870 background_store_canvas_->getTopPlatformDevice(); |
| 871 cairo_surface_t* bg_surface = cairo_get_target(device.beginPlatformPaint()); | 871 cairo_surface_t* bg_surface = cairo_get_target(device.BeginPlatformPaint()); |
| 872 DCHECK_EQ(cairo_surface_get_type(bg_surface), CAIRO_SURFACE_TYPE_IMAGE); | 872 DCHECK_EQ(cairo_surface_get_type(bg_surface), CAIRO_SURFACE_TYPE_IMAGE); |
| 873 DCHECK_EQ(cairo_image_surface_get_format(bg_surface), CAIRO_FORMAT_ARGB32); | 873 DCHECK_EQ(cairo_image_surface_get_format(bg_surface), CAIRO_FORMAT_ARGB32); |
| 874 cairo_surface_flush(bg_surface); | 874 cairo_surface_flush(bg_surface); |
| 875 const unsigned char* bg_bytes = cairo_image_surface_get_data(bg_surface); | 875 const unsigned char* bg_bytes = cairo_image_surface_get_data(bg_surface); |
| 876 int full_bg_width = cairo_image_surface_get_width(bg_surface); | 876 int full_bg_width = cairo_image_surface_get_width(bg_surface); |
| 877 int full_bg_height = cairo_image_surface_get_height(bg_surface); | 877 int full_bg_height = cairo_image_surface_get_height(bg_surface); |
| 878 int bg_stride = cairo_image_surface_get_stride(bg_surface); | 878 int bg_stride = cairo_image_surface_get_stride(bg_surface); |
| 879 | 879 |
| 880 int bytes_per_pixel = 4; // ARGB32 = 4 bytes per pixel. | 880 int bytes_per_pixel = 4; // ARGB32 = 4 bytes per pixel. |
| 881 #endif | 881 #endif |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 } | 1388 } |
| 1389 #endif | 1389 #endif |
| 1390 | 1390 |
| 1391 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1391 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
| 1392 int resource_id) { | 1392 int resource_id) { |
| 1393 if (!plugin_) | 1393 if (!plugin_) |
| 1394 return; | 1394 return; |
| 1395 | 1395 |
| 1396 plugin_->URLRedirectResponse(allow, resource_id); | 1396 plugin_->URLRedirectResponse(allow, resource_id); |
| 1397 } | 1397 } |
| OLD | NEW |