Changeset 140713 in webkit


Ignore:
Timestamp:
Jan 24, 2013 1:02:11 PM (11 years ago)
Author:
dino@apple.com
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):

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r140712 r140713  
     12013-01-24  Dean Jackson  <dino@apple.com>
     2
     3        Allow some plugin snapshot UI content to come from Injected Bundle
     4        https://bugs.webkit.org/show_bug.cgi?id=107852
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Hook up three new methods: plugInStartLabelTitle, plugInStartLabelSubtitle and
     9        plugInExtraStyleSheet to allow some custom styling and content to come
     10        from the InjectedBundle.
     11
     12        * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Callbacks added to
     13        WKBundlePageUIClient structure.
     14        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Stub implementations
     15        of the three new methods.
     16        (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
     17        (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
     18        (WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet):
     19        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
     20        (InjectedBundlePageUIClient):
     21        * WebProcess/WebCoreSupport/WebChromeClient.cpp: Call into the injected bundle
     22        for each of these methods.
     23        (WebKit::WebChromeClient::plugInStartLabelTitle):
     24        (WebKit::WebChromeClient::plugInStartLabelSubtitle):
     25        (WebKit::WebChromeClient::plugInExtraStyleSheet):
     26        * WebProcess/WebCoreSupport/WebChromeClient.h:
     27        (WebChromeClient): Declare the virtual methods in the Chrome
     28        Client so that they can accessed from WebCore eventually.
     29
    1302013-01-24  Anders Carlsson  <andersca@apple.com>
    231
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h

    r138434 r140713  
    250250typedef 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);
    251251typedef WKImageRef (*WKBundlePagePlugInStartLabelImageCallback)(WKBundlePageLabelSize size, const void *clientInfo);
     252typedef WKStringRef (*WKBundlePagePlugInStartLabelTitleCallback)(const void *clientInfo);
     253typedef WKStringRef (*WKBundlePagePlugInStartLabelSubtitleCallback)(const void *clientInfo);
     254typedef WKStringRef (*WKBundlePagePlugInExtraStyleSheetCallback)(const void *clientInfo);
    252255
    253256struct WKBundlePageUIClient {
     
    275278    WKBundlePageExceededDatabaseQuotaCallback                           didExceedDatabaseQuota;
    276279    WKBundlePagePlugInStartLabelImageCallback                           plugInStartLabelImage;
     280    WKBundlePagePlugInStartLabelTitleCallback                           plugInStartLabelTitle;
     281    WKBundlePagePlugInStartLabelSubtitleCallback                        plugInStartLabelSubtitle;
     282    WKBundlePagePlugInExtraStyleSheetCallback                           plugInExtraStyleSheet;
    277283};
    278284typedef struct WKBundlePageUIClient WKBundlePageUIClient;
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp

    r137067 r140713  
    184184}
    185185
     186String InjectedBundlePageUIClient::plugInStartLabelTitle() const
     187{
     188    return String();
     189}
     190
     191String InjectedBundlePageUIClient::plugInStartLabelSubtitle() const
     192{
     193    return String();
     194}
     195
     196String InjectedBundlePageUIClient::plugInExtraStyleSheet() const
     197{
     198    return String();
     199}
     200
    186201} // namespace WebKit
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h

    r137067 r140713  
    7373
    7474    PassRefPtr<WebImage> plugInStartLabelImage(WebCore::RenderSnapshottedPlugIn::LabelSize) const;
     75    String plugInStartLabelTitle() const;
     76    String plugInStartLabelSubtitle() const;
     77    String plugInExtraStyleSheet() const;
     78
    7579};
    7680
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r139078 r140713  
    806806}
    807807
     808String WebChromeClient::plugInStartLabelTitle() const
     809{
     810    return m_page->injectedBundleUIClient().plugInStartLabelTitle();
     811}
     812
     813String WebChromeClient::plugInStartLabelSubtitle() const
     814{
     815    return m_page->injectedBundleUIClient().plugInStartLabelSubtitle();
     816}
     817
     818String WebChromeClient::plugInExtraStyleSheet() const
     819{
     820    return m_page->injectedBundleUIClient().plugInExtraStyleSheet();
     821}
     822
    808823} // namespace WebKit
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

    r139078 r140713  
    220220
    221221    virtual PassRefPtr<WebCore::Image> plugInStartLabelImage(WebCore::RenderSnapshottedPlugIn::LabelSize) const OVERRIDE;
     222    virtual String plugInStartLabelTitle() const;
     223    virtual String plugInStartLabelSubtitle() const;
     224    virtual String plugInExtraStyleSheet() const;
    222225
    223226    String m_cachedToolTip;
  • trunk/Tools/ChangeLog

    r140703 r140713  
     12013-01-24  Dean Jackson  <dino@apple.com>
     2
     3        Allow some plugin snapshot UI content to come from Injected Bundle
     4        https://bugs.webkit.org/show_bug.cgi?id=107852
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Null implementations of plugInStartLabelTitle, plugInStartLabelSubtitle and
     9        plugInExtraStyleSheet.
     10
     11        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
     12        (WTR::InjectedBundlePage::InjectedBundlePage):
     13
    1142013-01-24  Erik Arvidsson  <arv@chromium.org>
    215
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

    r140268 r140713  
    378378        didExceedDatabaseQuota,
    379379        0, /*plugInStartLabelImage*/
     380        0, /*plugInStartLabelTitle*/
     381        0, /*plugInStartLabelSubtitle*/
     382        0, /*plugInExtraStyleSheet*/
    380383    };
    381384    WKBundlePageSetUIClient(m_page, &uiClient);
Note: See TracChangeset for help on using the changeset viewer.