Title: [140713] trunk
Revision
140713
Author
d...@apple.com
Date
2013-01-24 13:02:11 -0800 (Thu, 24 Jan 2013)

Log Message

Allow some plugin snapshot UI content to come from Injected Bundle
https://bugs.webkit.org/show_bug.cgi?id=107852

Reviewed by Anders Carlsson.

Source/WebKit2:

Hook up three new methods: plugInStartLabelTitle, plugInStartLabelSubtitle and
plugInExtraStyleSheet to allow some custom styling and content to come
from the InjectedBundle.

* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Callbacks added to
WKBundlePageUIClient structure.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Stub implementations
of the three new methods.
(WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
(WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
(WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
(InjectedBundlePageUIClient):
* WebProcess/WebCoreSupport/WebChromeClient.cpp: Call into the injected bundle
for each of these methods.
(WebKit::WebChromeClient::plugInStartLabelTitle):
(WebKit::WebChromeClient::plugInStartLabelSubtitle):
(WebKit::WebChromeClient::plugInExtraStyleSheet):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient): Declare the virtual methods in the Chrome
Client so that they can accessed from WebCore eventually.

Tools:

Null implementations of plugInStartLabelTitle, plugInStartLabelSubtitle and
plugInExtraStyleSheet.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (140712 => 140713)


--- trunk/Source/WebKit2/ChangeLog	2013-01-24 21:00:27 UTC (rev 140712)
+++ trunk/Source/WebKit2/ChangeLog	2013-01-24 21:02:11 UTC (rev 140713)
@@ -1,3 +1,32 @@
+2013-01-24  Dean Jackson  <d...@apple.com>
+
+        Allow some plugin snapshot UI content to come from Injected Bundle
+        https://bugs.webkit.org/show_bug.cgi?id=107852
+
+        Reviewed by Anders Carlsson.
+
+        Hook up three new methods: plugInStartLabelTitle, plugInStartLabelSubtitle and
+        plugInExtraStyleSheet to allow some custom styling and content to come
+        from the InjectedBundle.
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Callbacks added to
+        WKBundlePageUIClient structure.
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Stub implementations
+        of the three new methods.
+        (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
+        (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
+        (WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet):
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
+        (InjectedBundlePageUIClient):
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp: Call into the injected bundle
+        for each of these methods.
+        (WebKit::WebChromeClient::plugInStartLabelTitle):
+        (WebKit::WebChromeClient::plugInStartLabelSubtitle):
+        (WebKit::WebChromeClient::plugInExtraStyleSheet):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        (WebChromeClient): Declare the virtual methods in the Chrome
+        Client so that they can accessed from WebCore eventually.
+
 2013-01-24  Anders Carlsson  <ander...@apple.com>
 
         Add stubbed out StorageNamespaceProxy class

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h (140712 => 140713)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h	2013-01-24 21:00:27 UTC (rev 140712)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h	2013-01-24 21:02:11 UTC (rev 140713)
@@ -249,6 +249,9 @@
 typedef void (*WKBundlePageReachedAppCacheOriginQuotaCallback)(WKBundlePageRef page, WKSecurityOriginRef origin, int64_t totalBytesNeeded, const void *clientInfo);
 typedef uint64_t (*WKBundlePageExceededDatabaseQuotaCallback)(WKBundlePageRef page, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef databaseDisplayName, uint64_t currentQuotaBytes, uint64_t currentOriginUsageBytes, uint64_t currentDatabaseUsageBytes, uint64_t expectedUsageBytes, const void *clientInfo);
 typedef WKImageRef (*WKBundlePagePlugInStartLabelImageCallback)(WKBundlePageLabelSize size, const void *clientInfo);
+typedef WKStringRef (*WKBundlePagePlugInStartLabelTitleCallback)(const void *clientInfo);
+typedef WKStringRef (*WKBundlePagePlugInStartLabelSubtitleCallback)(const void *clientInfo);
+typedef WKStringRef (*WKBundlePagePlugInExtraStyleSheetCallback)(const void *clientInfo);
 
 struct WKBundlePageUIClient {
     int                                                                 version;
@@ -274,6 +277,9 @@
     // Version 2.
     WKBundlePageExceededDatabaseQuotaCallback                           didExceedDatabaseQuota;
     WKBundlePagePlugInStartLabelImageCallback                           plugInStartLabelImage;
+    WKBundlePagePlugInStartLabelTitleCallback                           plugInStartLabelTitle;
+    WKBundlePagePlugInStartLabelSubtitleCallback                        plugInStartLabelSubtitle;
+    WKBundlePagePlugInExtraStyleSheetCallback                           plugInExtraStyleSheet;
 };
 typedef struct WKBundlePageUIClient WKBundlePageUIClient;
 

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp (140712 => 140713)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp	2013-01-24 21:00:27 UTC (rev 140712)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp	2013-01-24 21:02:11 UTC (rev 140713)
@@ -183,4 +183,19 @@
     return adoptRef(toImpl(m_client.plugInStartLabelImage(wkSize, m_client.clientInfo)));
 }
 
+String InjectedBundlePageUIClient::plugInStartLabelTitle() const
+{
+    return String();
+}
+
+String InjectedBundlePageUIClient::plugInStartLabelSubtitle() const
+{
+    return String();
+}
+
+String InjectedBundlePageUIClient::plugInExtraStyleSheet() const
+{
+    return String();
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h (140712 => 140713)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h	2013-01-24 21:00:27 UTC (rev 140712)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h	2013-01-24 21:02:11 UTC (rev 140713)
@@ -72,6 +72,10 @@
     uint64_t didExceedDatabaseQuota(WebPage*, WebSecurityOrigin*, const String& databaseName, const String& databaseDisplayName, uint64_t currentQuotaBytes, uint64_t currentOriginUsageBytes, uint64_t currentDatabaseUsageBytes, uint64_t expectedUsageBytes);
 
     PassRefPtr<WebImage> plugInStartLabelImage(WebCore::RenderSnapshottedPlugIn::LabelSize) const;
+    String plugInStartLabelTitle() const;
+    String plugInStartLabelSubtitle() const;
+    String plugInExtraStyleSheet() const;
+
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (140712 => 140713)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2013-01-24 21:00:27 UTC (rev 140712)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2013-01-24 21:02:11 UTC (rev 140713)
@@ -805,4 +805,19 @@
     return m_page->injectedBundleUIClient().plugInStartLabelImage(size)->bitmap()->createImage();
 }
 
+String WebChromeClient::plugInStartLabelTitle() const
+{
+    return m_page->injectedBundleUIClient().plugInStartLabelTitle();
+}
+
+String WebChromeClient::plugInStartLabelSubtitle() const
+{
+    return m_page->injectedBundleUIClient().plugInStartLabelSubtitle();
+}
+
+String WebChromeClient::plugInExtraStyleSheet() const
+{
+    return m_page->injectedBundleUIClient().plugInExtraStyleSheet();
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (140712 => 140713)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2013-01-24 21:00:27 UTC (rev 140712)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2013-01-24 21:02:11 UTC (rev 140713)
@@ -219,6 +219,9 @@
     virtual void logDiagnosticMessage(const String& message, const String& description, const String& success) OVERRIDE;
 
     virtual PassRefPtr<WebCore::Image> plugInStartLabelImage(WebCore::RenderSnapshottedPlugIn::LabelSize) const OVERRIDE;
+    virtual String plugInStartLabelTitle() const;
+    virtual String plugInStartLabelSubtitle() const;
+    virtual String plugInExtraStyleSheet() const;
 
     String m_cachedToolTip;
     mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame;

Modified: trunk/Tools/ChangeLog (140712 => 140713)


--- trunk/Tools/ChangeLog	2013-01-24 21:00:27 UTC (rev 140712)
+++ trunk/Tools/ChangeLog	2013-01-24 21:02:11 UTC (rev 140713)
@@ -1,3 +1,16 @@
+2013-01-24  Dean Jackson  <d...@apple.com>
+
+        Allow some plugin snapshot UI content to come from Injected Bundle
+        https://bugs.webkit.org/show_bug.cgi?id=107852
+
+        Reviewed by Anders Carlsson.
+
+        Null implementations of plugInStartLabelTitle, plugInStartLabelSubtitle and
+        plugInExtraStyleSheet.
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::InjectedBundlePage):
+
 2013-01-24  Erik Arvidsson  <a...@chromium.org>
 
         Unreviewed, rolling out r140561.

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (140712 => 140713)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp	2013-01-24 21:00:27 UTC (rev 140712)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp	2013-01-24 21:02:11 UTC (rev 140713)
@@ -377,6 +377,9 @@
         didReachApplicationCacheOriginQuota,
         didExceedDatabaseQuota,
         0, /*plugInStartLabelImage*/
+        0, /*plugInStartLabelTitle*/
+        0, /*plugInStartLabelSubtitle*/
+        0, /*plugInExtraStyleSheet*/
     };
     WKBundlePageSetUIClient(m_page, &uiClient);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to