Commit 2db86ea4 authored by andersca@apple.com's avatar andersca@apple.com

2009-01-05 Anders Carlsson <andersca@apple.com>

        Reviewed by Jon Honeycutt.

        Pass more information in the property bag passed to embeddedViewWithArguments.
        
        * Interfaces/IWebUIDelegatePrivate.idl:
        Declare new keys.
        
        * WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::createPlugin):
        Pass the base URL, MIME type and the containing element to embeddedViewWithArguments.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8ff5e5af
2009-01-05 Anders Carlsson <andersca@apple.com>
Reviewed by Jon Honeycutt.
Pass more information in the property bag passed to embeddedViewWithArguments.
* Interfaces/IWebUIDelegatePrivate.idl:
Declare new keys.
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::createPlugin):
Pass the base URL, MIME type and the containing element to embeddedViewWithArguments.
2009-01-05 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler, Jon Honeycutt.
......
......@@ -31,6 +31,9 @@ import "IWebView.idl";
#endif
cpp_quote("#define WebEmbeddedViewAttributesKey TEXT(\"WebEmbeddedViewAttributesKey\")")
cpp_quote("#define WebEmbeddedViewBaseURLKey TEXT(\"WebEmbeddedViewBaseURLKey\")")
cpp_quote("#define WebEmbeddedViewContainingElementKey TEXT(\"WebEmbeddedViewContainingElementKey\")")
cpp_quote("#define WebEmbeddedViewMIMETypeKey TEXT(\"WebEmbeddedViewMIMETypeKey\")")
interface IWebEmbeddedView;
interface IWebFrame;
......
......@@ -31,6 +31,7 @@
#include "CFDictionaryPropertyBag.h"
#include "COMPropertyBag.h"
#include "DOMHTMLClasses.h"
#include "EmbeddedWidget.h"
#include "MarshallingHelpers.h"
#include "WebCachedPagePlatformData.h"
......@@ -609,11 +610,16 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, Element* e
for (unsigned i = 0; i < paramNames.size(); i++)
viewArguments.set(paramNames[i], paramValues[i]);
COMPtr<IPropertyBag> viewArgumentsBag(AdoptCOM, COMPropertyBag<String>::adopt(viewArguments));
COMPtr<IDOMElement> containingElement(AdoptCOM, DOMElement::createInstance(element));
// Now create a new property bag where the view arguments is the only property.
HashMap<String, COMPtr<IUnknown> > arguments;
arguments.set(WebEmbeddedViewAttributesKey, COMPtr<IUnknown>(AdoptCOM, viewArgumentsBag.releaseRef()));
COMPtr<IPropertyBag> argumentsBag(AdoptCOM, COMPropertyBag<COMPtr<IUnknown> >::adopt(arguments));
HashMap<String, COMVariant> arguments;
arguments.set(WebEmbeddedViewAttributesKey, viewArgumentsBag);
arguments.set(WebEmbeddedViewBaseURLKey, url.string());
arguments.set(WebEmbeddedViewContainingElementKey, containingElement);
arguments.set(WebEmbeddedViewMIMETypeKey, mimeType);
COMPtr<IPropertyBag> argumentsBag(AdoptCOM, COMPropertyBag<COMVariant>::adopt(arguments));
COMPtr<IWebEmbeddedView> view;
HRESULT result = uiPrivate->embeddedViewWithArguments(webView, m_webFrame, argumentsBag.get(), &view);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment