| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/renderer/webplugin_delegate_proxy.h" | 5 #include "chrome/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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
| 24 #include "chrome/common/plugin_messages.h" | 24 #include "chrome/common/plugin_messages.h" |
| 25 #include "chrome/common/render_messages.h" | 25 #include "chrome/common/render_messages.h" |
| 26 #include "chrome/plugin/npobject_proxy.h" | 26 #include "chrome/plugin/npobject_proxy.h" |
| 27 #include "chrome/plugin/npobject_stub.h" | 27 #include "chrome/plugin/npobject_stub.h" |
| 28 #include "chrome/plugin/npobject_util.h" | 28 #include "chrome/plugin/npobject_util.h" |
| 29 #include "chrome/renderer/command_buffer_proxy.h" | 29 #include "chrome/renderer/command_buffer_proxy.h" |
| 30 #include "chrome/renderer/render_thread.h" | 30 #include "chrome/renderer/render_thread.h" |
| 31 #include "chrome/renderer/render_view.h" | 31 #include "chrome/renderer/render_view.h" |
| 32 #include "gfx/blit.h" | 32 #include "gfx/blit.h" |
| 33 #include "gfx/canvas.h" | 33 #include "gfx/canvas_skia.h" |
| 34 #include "gfx/native_widget_types.h" | 34 #include "gfx/native_widget_types.h" |
| 35 #include "gfx/size.h" | 35 #include "gfx/size.h" |
| 36 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
| 37 #include "grit/renderer_resources.h" | 37 #include "grit/renderer_resources.h" |
| 38 #include "net/base/mime_util.h" | 38 #include "net/base/mime_util.h" |
| 39 #include "printing/native_metafile.h" | 39 #include "printing/native_metafile.h" |
| 40 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" | 40 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" |
| 41 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" | 41 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" |
| 42 #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" | 42 #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" |
| 43 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 43 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| (...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 if (!sad_plugin_) { | 1275 if (!sad_plugin_) { |
| 1276 sad_plugin_ = ResourceBundle::GetSharedInstance().GetBitmapNamed( | 1276 sad_plugin_ = ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| 1277 IDR_SAD_PLUGIN); | 1277 IDR_SAD_PLUGIN); |
| 1278 } | 1278 } |
| 1279 if (!sad_plugin_) | 1279 if (!sad_plugin_) |
| 1280 return; | 1280 return; |
| 1281 | 1281 |
| 1282 // Make a temporary canvas for the background image. | 1282 // Make a temporary canvas for the background image. |
| 1283 const int width = plugin_rect_.width(); | 1283 const int width = plugin_rect_.width(); |
| 1284 const int height = plugin_rect_.height(); | 1284 const int height = plugin_rect_.height(); |
| 1285 gfx::Canvas canvas(width, height, false); | 1285 gfx::CanvasSkia canvas(width, height, false); |
| 1286 #if defined(OS_MACOSX) | 1286 #if defined(OS_MACOSX) |
| 1287 // Flip the canvas, since the context expects flipped data. | 1287 // Flip the canvas, since the context expects flipped data. |
| 1288 canvas.translate(0, height); | 1288 canvas.translate(0, height); |
| 1289 canvas.scale(1, -1); | 1289 canvas.scale(1, -1); |
| 1290 #endif | 1290 #endif |
| 1291 SkPaint paint; | 1291 SkPaint paint; |
| 1292 | 1292 |
| 1293 paint.setStyle(SkPaint::kFill_Style); | 1293 paint.setStyle(SkPaint::kFill_Style); |
| 1294 paint.setColor(SK_ColorBLACK); | 1294 paint.setColor(SK_ColorBLACK); |
| 1295 canvas.drawRectCoords(0, 0, SkIntToScalar(width), SkIntToScalar(height), | 1295 canvas.drawRectCoords(0, 0, SkIntToScalar(width), SkIntToScalar(height), |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1553 if (index->mime_type == "application/x-vnd.moveplayer.qm" || | 1553 if (index->mime_type == "application/x-vnd.moveplayer.qm" || |
| 1554 index->mime_type == "application/x-vnd.moveplay2.qm" || | 1554 index->mime_type == "application/x-vnd.moveplay2.qm" || |
| 1555 index->mime_type == "application/x-vnd.movenetworks.qm" || | 1555 index->mime_type == "application/x-vnd.movenetworks.qm" || |
| 1556 index->mime_type == "application/x-vnd.mnplayer.qm") { | 1556 index->mime_type == "application/x-vnd.mnplayer.qm") { |
| 1557 return true; | 1557 return true; |
| 1558 } | 1558 } |
| 1559 } | 1559 } |
| 1560 return false; | 1560 return false; |
| 1561 } | 1561 } |
| 1562 #endif | 1562 #endif |
| OLD | NEW |