diff options
Diffstat (limited to 'webkit/glue/chromium_bridge_impl.cc')
-rw-r--r-- | webkit/glue/chromium_bridge_impl.cc | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc index effc33e..5774439 100644 --- a/webkit/glue/chromium_bridge_impl.cc +++ b/webkit/glue/chromium_bridge_impl.cc @@ -52,9 +52,6 @@ #include <vssym32.h> #include "base/gfx/native_theme.h" - -// This is only needed on Windows right now. -#include "BitmapImageSingleFrameSkia.h" #endif namespace { @@ -330,44 +327,13 @@ String ChromiumBridge::uiResourceProtocol() { // Resources ------------------------------------------------------------------ -#if defined(OS_WIN) -// Creates an Image for the text area resize corner. We do this by drawing the -// theme native control into a memory buffer then converting the memory buffer -// into an image. We don't bother caching this image because the caller holds -// onto a static copy (see WebCore/rendering/RenderLayer.cpp). -static PassRefPtr<Image> GetTextAreaResizeCorner() { - // Get the size of the resizer. - const int thickness = ScrollbarTheme::nativeTheme()->scrollbarThickness(); - - // Setup a memory buffer. - gfx::PlatformCanvasWin canvas(thickness, thickness, false); - gfx::PlatformDeviceWin& device = canvas.getTopPlatformDevice(); - device.prepareForGDI(0, 0, thickness, thickness); - HDC hdc = device.getBitmapDC(); - RECT widgetRect = { 0, 0, thickness, thickness }; - - // Do the drawing. - gfx::NativeTheme::instance()->PaintStatusGripper(hdc, SP_GRIPPER, 0, 0, - &widgetRect); - device.postProcessGDI(0, 0, thickness, thickness); - return BitmapImageSingleFrameSkia::create(device.accessBitmap(false)); -} -#endif - PassRefPtr<Image> ChromiumBridge::loadPlatformImageResource(const char* name) { - // Some need special handling. - if (!strcmp(name, "textAreaResizeCorner")) { -#if defined(OS_WIN) - return GetTextAreaResizeCorner(); -#else - DLOG(WARNING) << "This needs implementing on other platforms."; - return Image::nullImage(); -#endif - } // The rest get converted to a resource ID that we can pass to the glue. int resource_id = 0; - if (!strcmp(name, "missingImage")) { + if (!strcmp(name, "textAreaResizeCorner")) { + resource_id = IDR_TEXTAREA_RESIZER; + } else if (!strcmp(name, "missingImage")) { resource_id = IDR_BROKENIMAGE; } else if (!strcmp(name, "tickmarkDash")) { resource_id = IDR_TICKMARK_DASH; |