Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: webkit/api/src/ChromiumBridge.cpp

Issue 308001: Chromium fix for "Copy Image".... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « app/clipboard/clipboard_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "WebRect.h" 50 #include "WebRect.h"
51 #include "WebSandboxSupport.h" 51 #include "WebSandboxSupport.h"
52 #include "WebThemeEngine.h" 52 #include "WebThemeEngine.h"
53 #endif 53 #endif
54 54
55 #if PLATFORM(LINUX) 55 #if PLATFORM(LINUX)
56 #include "WebSandboxSupport.h" 56 #include "WebSandboxSupport.h"
57 #include "WebFontInfo.h" 57 #include "WebFontInfo.h"
58 #endif 58 #endif
59 59
60 #if WEBKIT_USING_SKIA
61 #include "NativeImageSkia.h"
62 #endif
63
60 #include "BitmapImage.h" 64 #include "BitmapImage.h"
61 #include "GraphicsContext.h" 65 #include "GraphicsContext.h"
62 #include "KURL.h" 66 #include "KURL.h"
63 #include "NativeImageSkia.h"
64 #include "NotImplemented.h" 67 #include "NotImplemented.h"
65 #include "PlatformContextSkia.h" 68 #include "PlatformContextSkia.h"
66 #include "PluginData.h" 69 #include "PluginData.h"
67 #include <wtf/Assertions.h> 70 #include <wtf/Assertions.h>
68 71
69 // We are part of the WebKit implementation. 72 // We are part of the WebKit implementation.
70 using namespace WebKit; 73 using namespace WebKit;
71 74
72 namespace WebCore { 75 namespace WebCore {
73 76
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void ChromiumBridge::clipboardWritePlainText(const String& plainText) 114 void ChromiumBridge::clipboardWritePlainText(const String& plainText)
112 { 115 {
113 webKitClient()->clipboard()->writePlainText(plainText); 116 webKitClient()->clipboard()->writePlainText(plainText);
114 } 117 }
115 118
116 void ChromiumBridge::clipboardWriteURL(const KURL& url, const String& title) 119 void ChromiumBridge::clipboardWriteURL(const KURL& url, const String& title)
117 { 120 {
118 webKitClient()->clipboard()->writeURL(url, title); 121 webKitClient()->clipboard()->writeURL(url, title);
119 } 122 }
120 123
121 void ChromiumBridge::clipboardWriteImage(const NativeImageSkia* image, 124 void ChromiumBridge::clipboardWriteImage(NativeImagePtr image,
122 const KURL& sourceURL, 125 const KURL& sourceURL,
123 const String& title) 126 const String& title)
124 { 127 {
125 #if WEBKIT_USING_SKIA 128 #if WEBKIT_USING_SKIA
126 webKitClient()->clipboard()->writeImage( 129 WebImage webImage(*image);
127 WebImage(*image), sourceURL, title);
128 #else 130 #else
129 // FIXME clipboardWriteImage probably shouldn't take a NativeImageSkia 131 WebImage webImage(image);
130 notImplemented();
131 #endif 132 #endif
133 webKitClient()->clipboard()->writeImage(webImage, sourceURL, title);
132 } 134 }
133 135
134 // Cookies -------------------------------------------------------------------- 136 // Cookies --------------------------------------------------------------------
135 137
136 void ChromiumBridge::setCookies(const KURL& url, 138 void ChromiumBridge::setCookies(const KURL& url,
137 const KURL& firstPartyForCookies, 139 const KURL& firstPartyForCookies,
138 const String& cookie) 140 const String& cookie)
139 { 141 {
140 webKitClient()->setCookies(url, firstPartyForCookies, cookie); 142 webKitClient()->setCookies(url, firstPartyForCookies, cookie);
141 } 143 }
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 { 582 {
581 return webKitClient()->widgetSetFocus(widget); 583 return webKitClient()->widgetSetFocus(widget);
582 } 584 }
583 585
584 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) 586 WorkerContextProxy* WorkerContextProxy::create(Worker* worker)
585 { 587 {
586 return webKitClient()->createWorkerContextProxy(worker); 588 return webKitClient()->createWorkerContextProxy(worker);
587 } 589 }
588 590
589 } // namespace WebCore 591 } // namespace WebCore
OLDNEW
« no previous file with comments | « app/clipboard/clipboard_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698