summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2009-08-17 13:41:56 +0100
committerAndrei Popescu <andreip@google.com>2009-08-17 13:53:08 +0100
commit6d289e80ffb2e1dcc0a3bdce9f2bf7fa3263745d (patch)
tree56d317410e95ea0b1852350a285a01e3a6a3a90c /WebKit
parent6461f0be0cee2f8080a648fabd883943614e672c (diff)
downloadexternal_webkit-6d289e80ffb2e1dcc0a3bdce9f2bf7fa3263745d.zip
external_webkit-6d289e80ffb2e1dcc0a3bdce9f2bf7fa3263745d.tar.gz
external_webkit-6d289e80ffb2e1dcc0a3bdce9f2bf7fa3263745d.tar.bz2
ResourceHandleAndroid fix
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp14
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h10
2 files changed, 13 insertions, 11 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index 7554a84..c69d5e7 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -905,17 +905,17 @@ static bool isYouTubeUrl(const KURL& url, const String& mimeType)
&& equalIgnoringCase(mimeType, "application/x-shockwave-flash");
}
-Widget* FrameLoaderClientAndroid::createPlugin(
+WTF::PassRefPtr<Widget> FrameLoaderClientAndroid::createPlugin(
const IntSize& size,
HTMLPlugInElement* element,
const KURL& url,
- const WTF::Vector<String, 0u>& names,
- const WTF::Vector<String, 0u>& values,
+ const WTF::Vector<String>& names,
+ const WTF::Vector<String>& values,
const String& mimeType,
bool loadManually) {
// Create an iframe for youtube urls.
if (isYouTubeUrl(url, mimeType)) {
- RefPtr<Frame> frame = createFrame(blankURL(), String(), element,
+ WTF::RefPtr<Frame> frame = createFrame(blankURL(), String(), element,
String(), false, 0, 0);
if (frame) {
// grab everything after /v/
@@ -938,7 +938,9 @@ Widget* FrameLoaderClientAndroid::createPlugin(
delete a;
loadDataIntoFrame(frame.get(),
KURL("file:///android_asset/webkit/"), String(), s);
- return frame->view();
+ // Transfer ownership to a local refptr.
+ WTF::RefPtr<Widget> widget = adoptRef(frame->view());
+ return widget.release();
}
return NULL;
}
@@ -961,7 +963,7 @@ void FrameLoaderClientAndroid::redirectDataToPlugin(Widget* pluginWidget) {
notImplemented();
}
-Widget* FrameLoaderClientAndroid::createJavaAppletWidget(const IntSize&, HTMLAppletElement*,
+WTF::PassRefPtr<Widget> FrameLoaderClientAndroid::createJavaAppletWidget(const IntSize&, HTMLAppletElement*,
const KURL& baseURL, const WTF::Vector<String>& paramNames,
const WTF::Vector<String>& paramValues) {
// don't support widget yet
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
index e0de972..1db3d70 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
@@ -169,12 +169,12 @@ namespace android {
virtual WTF::PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
- virtual Widget* createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&,
- const WTF::Vector<WebCore::String, 0u>&, const WTF::Vector<String, 0u>&,
- const String&, bool);
+ virtual WTF::PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&,
+ const WTF::Vector<String>&, const WTF::Vector<String>&,
+ const String&, bool loadManually);
virtual void redirectDataToPlugin(Widget* pluginWidget);
-
- virtual Widget* createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues);
+
+ virtual WTF::PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues);
virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
virtual String overrideMediaType() const;