Changeset 87335 in webkit


Ignore:
Timestamp:
May 25, 2011 4:41:07 PM (13 years ago)
Author:
mrowe@apple.com
Message:

<rdar://problem/9504058> Need some way to query user gesture state from injected bundle

Reviewed by Sam Weinig.

Source/WebCore:

  • WebCore.exp.in: Add an export that WebKit2 needs.

Source/WebKit2:

Add WKBundleIsProcessingUserGesture.

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleIsPageBoxVisible):
(WKBundleIsProcessingUserGesture):

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::isProcessingUserGesture):

  • WebProcess/InjectedBundle/InjectedBundle.h:
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87331 r87335  
     12011-05-25  Mark Rowe  <mrowe@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        <rdar://problem/9504058> Need some way to query user gesture state from injected bundle
     6
     7        * WebCore.exp.in: Add an export that WebKit2 needs.
     8
    192011-05-25  Jer Noble  <jer.noble@apple.com>
    210
  • trunk/Source/WebCore/WebCore.exp.in

    r87331 r87335  
    541541__ZN7WebCore20ResourceResponseBaseC2Ev
    542542__ZN7WebCore20SpaceSplitStringData12createVectorEv
     543__ZN7WebCore20UserGestureIndicator23s_processingUserGestureE
    543544__ZN7WebCore20UserGestureIndicatorC1ENS_26ProcessingUserGestureStateE
    544545__ZN7WebCore20UserGestureIndicatorD1Ev
  • trunk/Source/WebKit2/ChangeLog

    r87328 r87335  
     12011-05-25  Mark Rowe  <mrowe@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        <rdar://problem/9504058> Need some way to query user gesture state from injected bundle
     6
     7        Add WKBundleIsProcessingUserGesture.
     8
     9        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     10        (WKBundleIsPageBoxVisible):
     11        (WKBundleIsProcessingUserGesture):
     12        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     13        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     14        (WebKit::InjectedBundle::isProcessingUserGesture):
     15        * WebProcess/InjectedBundle/InjectedBundle.h:
     16
    1172011-05-24  Jer Noble  <jer.noble@apple.com>
    218
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r87175 r87335  
    194194}
    195195
    196 WK_EXPORT bool WKBundleIsPageBoxVisible(WKBundleRef bundleRef, WKBundleFrameRef frameRef, int pageIndex)
     196bool WKBundleIsPageBoxVisible(WKBundleRef bundleRef, WKBundleFrameRef frameRef, int pageIndex)
    197197{
    198198    return toImpl(bundleRef)->isPageBoxVisible(toImpl(frameRef), pageIndex);
    199199}
     200
     201bool WKBundleIsProcessingUserGesture(WKBundleRef)
     202{
     203    return InjectedBundle::isProcessingUserGesture();
     204}
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r87072 r87335  
    8080WK_EXPORT void WKBundleResetOriginAccessWhitelists(WKBundleRef bundle);
    8181
     82WK_EXPORT bool WKBundleIsProcessingUserGesture(WKBundleRef bundle);
     83
    8284#ifdef __cplusplus
    8385}
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r87072 r87335  
    5252#include <WebCore/SecurityOrigin.h>
    5353#include <WebCore/Settings.h>
     54#include <WebCore/UserGestureIndicator.h>
    5455#include <wtf/OwnArrayPtr.h>
    5556#include <wtf/PassOwnArrayPtr.h>
     
    215216
    216217    return PrintContext::isPageBoxVisible(coreFrame, pageIndex);
     218}
     219
     220bool InjectedBundle::isProcessingUserGesture()
     221{
     222    return UserGestureIndicator::getUserGestureState() == DefinitelyProcessingUserGesture;
    217223}
    218224
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r87072 r87335  
    132132    static void reportException(JSContextRef, JSValueRef exception);
    133133
     134    static bool isProcessingUserGesture();
     135
    134136private:
    135137    InjectedBundle(const String&);
Note: See TracChangeset for help on using the changeset viewer.