Changeset 146299 in webkit


Ignore:
Timestamp:
Mar 19, 2013, 9:08:49 PM (12 years ago)
Author:
pilgrim@chromium.org
Message:

[Chromium] Migrate to WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
https://bugs.webkit.org/show_bug.cgi?id=112754

Reviewed by Darin Fisher.

Remove old code behind ifndef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
now that it's always defined.

Source/WebKit/chromium:

  • public/WebCommonWorkerClient.h:

(WebCommonWorkerClient):

  • public/WebFrame.h:

(WebFrame):

  • public/WebFrameClient.h:

(WebFrameClient):
(WebKit::WebFrameClient::openFileSystem):
(WebKit::WebFrameClient::deleteFileSystem):

  • src/LocalFileSystemChromium.cpp:

(WebCore):
(WebCore::openFileSystemHelper):
(WebCore::LocalFileSystem::deleteFileSystem):

  • src/WebFrameImpl.cpp:
  • src/WebFrameImpl.h:

(WebFrameImpl):

  • src/WebWorkerClientImpl.cpp:

(WebKit::WebWorkerClientImpl::openFileSystem):

  • src/WebWorkerClientImpl.h:
  • src/WorkerFileSystemCallbacksBridge.cpp:
  • src/WorkerFileSystemCallbacksBridge.h:

(WorkerFileSystemCallbacksBridge):

Tools:

  • DumpRenderTree/chromium/WebViewHost.cpp:
  • DumpRenderTree/chromium/WebViewHost.h:

(WebViewHost):

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r146280 r146299  
     12013-03-19  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        [Chromium] Migrate to WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
     4        https://bugs.webkit.org/show_bug.cgi?id=112754
     5
     6        Reviewed by Darin Fisher.
     7
     8        Remove old code behind ifndef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
     9        now that it's always defined.
     10
     11        * public/WebCommonWorkerClient.h:
     12        (WebCommonWorkerClient):
     13        * public/WebFrame.h:
     14        (WebFrame):
     15        * public/WebFrameClient.h:
     16        (WebFrameClient):
     17        (WebKit::WebFrameClient::openFileSystem):
     18        (WebKit::WebFrameClient::deleteFileSystem):
     19        * src/LocalFileSystemChromium.cpp:
     20        (WebCore):
     21        (WebCore::openFileSystemHelper):
     22        (WebCore::LocalFileSystem::deleteFileSystem):
     23        * src/WebFrameImpl.cpp:
     24        * src/WebFrameImpl.h:
     25        (WebFrameImpl):
     26        * src/WebWorkerClientImpl.cpp:
     27        (WebKit::WebWorkerClientImpl::openFileSystem):
     28        * src/WebWorkerClientImpl.h:
     29        * src/WorkerFileSystemCallbacksBridge.cpp:
     30        * src/WorkerFileSystemCallbacksBridge.h:
     31        (WorkerFileSystemCallbacksBridge):
     32
    1332013-03-19  Kenneth Russell  <kbr@google.com>
    234
  • trunk/Source/WebKit/chromium/public/WebCommonWorkerClient.h

    r146111 r146299  
    6161
    6262    // Called on the main webkit thread before opening a file system.
    63 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    6463    virtual void openFileSystem(WebFileSystemType, long long size, bool create, WebFileSystemCallbacks*)
    65 #else
    66     virtual void openFileSystem(WebFileSystem::Type, long long size, bool create, WebFileSystemCallbacks*)
    67 #endif
    6864    {
    6965        WEBKIT_ASSERT_NOT_REACHED();
  • trunk/Source/WebKit/chromium/public/WebFrame.h

    r146111 r146299  
    292292    virtual v8::Local<v8::Context> mainWorldScriptContext() const = 0;
    293293
    294 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    295294    // Creates an instance of file system object.
    296295    virtual v8::Handle<v8::Value> createFileSystem(WebFileSystemType,
     
    309308        const WebString& filePath,
    310309        bool isDirectory) = 0;
    311 #else
    312     // Creates an instance of file system object.
    313     virtual v8::Handle<v8::Value> createFileSystem(WebFileSystem::Type,
    314         const WebString& name,
    315         const WebString& rootURL) = 0;
    316     // Creates an instance of serializable file system object.
    317     // FIXME: Remove this API after we have a better way of creating serialized
    318     // file system object.
    319     virtual v8::Handle<v8::Value> createSerializableFileSystem(WebFileSystem::Type,
    320         const WebString& name,
    321         const WebString& rootURL) = 0;
    322     // Creates an instance of file or directory entry object.
    323     virtual v8::Handle<v8::Value> createFileEntry(WebFileSystem::Type,
    324         const WebString& fileSystemName,
    325         const WebString& fileSystemRootURL,
    326         const WebString& filePath,
    327         bool isDirectory) = 0;
    328 #endif // WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    329310
    330311    // Navigation ----------------------------------------------------------
  • trunk/Source/WebKit/chromium/public/WebFrameClient.h

    r146111 r146299  
    361361    // called otherwise. The create bool is for indicating whether or not to
    362362    // create root path for file systems if it do not exist.
    363 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    364363    virtual void openFileSystem(
    365364        WebFrame*, WebFileSystemType, long long size,
    366365        bool create, WebFileSystemCallbacks*) { }
    367 #else
    368     virtual void openFileSystem(
    369         WebFrame*, WebFileSystem::Type, long long size,
    370         bool create, WebFileSystemCallbacks*) { }
    371 #endif
    372366
    373367    // Deletes FileSystem.
     
    377371    // All in-flight operations and following operations may fail after the
    378372    // FileSystem is deleted.
    379 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    380373    virtual void deleteFileSystem(
    381374        WebFrame*, WebFileSystemType, WebFileSystemCallbacks*) { }
    382 #else
    383     virtual void deleteFileSystem(
    384         WebFrame*, WebFileSystem::Type, WebFileSystemCallbacks*) { }
    385 #endif
    386375
    387376    // Quota ---------------------------------------------------------
  • trunk/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp

    r146111 r146299  
    155155}
    156156
    157 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    158157void openFileSystemForWorker(WebCommonWorkerClient* commonClient, WebFileSystemType type, long long size, bool create, WebFileSystemCallbacksImpl* callbacks, FileSystemSynchronousType synchronousType)
    159 #else
    160 void openFileSystemForWorker(WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, bool create, WebFileSystemCallbacksImpl* callbacks, FileSystemSynchronousType synchronousType)
    161 #endif
    162158{
    163159    WorkerScriptController* controller = WorkerScriptController::controllerForContext();
     
    205201            allowed = false;
    206202        else
    207 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    208203            webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystemType>(type), size, create == CreateIfNotPresent, new WebFileSystemCallbacksImpl(callbacks));
    209 #else
    210             webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, create == CreateIfNotPresent, new WebFileSystemCallbacksImpl(callbacks));
    211 #endif
    212204    } else {
    213205#if ENABLE(WORKERS)
     
    217209            allowed = false;
    218210        else
    219 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    220211            openFileSystemForWorker(webWorker->commonClient(), static_cast<WebFileSystemType>(type), size, create == CreateIfNotPresent, new WebFileSystemCallbacksImpl(callbacks, context, synchronousType), synchronousType);
    221 #else
    222             openFileSystemForWorker(webWorker->commonClient(), static_cast<WebFileSystem::Type>(type), size, create == CreateIfNotPresent, new WebFileSystemCallbacksImpl(callbacks, context, synchronousType), synchronousType);
    223 #endif
    224212#else
    225213        ASSERT_NOT_REACHED();
     
    256244    }
    257245
    258 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    259246    webFrame->client()->deleteFileSystem(webFrame, static_cast<WebFileSystemType>(type), new WebFileSystemCallbacksImpl(callbacks));
    260 #else
    261     webFrame->client()->deleteFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), new WebFileSystemCallbacksImpl(callbacks));
    262 #endif
    263247}
    264248
  • trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp

    r146111 r146299  
    903903}
    904904
    905 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    906905v8::Handle<v8::Value> WebFrameImpl::createFileSystem(WebFileSystemType type, const WebString& name, const WebString& path)
    907 #else
    908 v8::Handle<v8::Value> WebFrameImpl::createFileSystem(WebFileSystem::Type type, const WebString& name, const WebString& path)
    909 #endif
    910906{
    911907    ASSERT(frame());
     
    913909}
    914910
    915 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    916911v8::Handle<v8::Value> WebFrameImpl::createSerializableFileSystem(WebFileSystemType type, const WebString& name, const WebString& path)
    917 #else
    918 v8::Handle<v8::Value> WebFrameImpl::createSerializableFileSystem(WebFileSystem::Type type, const WebString& name, const WebString& path)
    919 #endif
    920912{
    921913    ASSERT(frame());
     
    925917}
    926918
    927 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    928919v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystemType type, const WebString& fileSystemName, const WebString& fileSystemPath, const WebString& filePath, bool isDirectory)
    929 #else
    930 v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystem::Type type, const WebString& fileSystemName, const WebString& fileSystemPath, const WebString& filePath, bool isDirectory)
    931 #endif
    932920{
    933921    ASSERT(frame());
  • trunk/Source/WebKit/chromium/src/WebFrameImpl.h

    r146111 r146299  
    129129        v8::Handle<v8::Value> argv[]);
    130130    virtual v8::Local<v8::Context> mainWorldScriptContext() const;
    131 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    132131    virtual v8::Handle<v8::Value> createFileSystem(WebFileSystemType,
    133132        const WebString& name,
     
    141140        const WebString& filePath,
    142141        bool isDirectory);
    143 #else
    144     virtual v8::Handle<v8::Value> createFileSystem(WebFileSystem::Type,
    145         const WebString& name,
    146         const WebString& path);
    147     virtual v8::Handle<v8::Value> createSerializableFileSystem(WebFileSystem::Type,
    148         const WebString& name,
    149         const WebString& path);
    150     virtual v8::Handle<v8::Value> createFileEntry(WebFileSystem::Type,
    151         const WebString& fileSystemName,
    152         const WebString& fileSystemPath,
    153         const WebString& filePath,
    154         bool isDirectory);
    155 #endif
    156142    virtual void reload(bool ignoreCache);
    157143    virtual void reloadWithOverrideURL(const WebURL& overrideUrl, bool ignoreCache);
  • trunk/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp

    r146111 r146299  
    123123}
    124124
    125 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    126125void WebWorkerClientImpl::openFileSystem(WebFileSystemType type, long long size, bool create,
    127126    WebFileSystemCallbacks* callbacks)
    128 #else
    129 void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long size, bool create,
    130     WebFileSystemCallbacks* callbacks)
    131 #endif
    132127{
    133128    if (askedToTerminate()) {
  • trunk/Source/WebKit/chromium/src/WebWorkerClientImpl.h

    r146111 r146299  
    8585    virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) OVERRIDE;
    8686    virtual bool allowFileSystem();
    87 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    8887    virtual void openFileSystem(WebFileSystemType, long long size, bool create,
    8988        WebFileSystemCallbacks*) OVERRIDE;
    90 #else
    91     virtual void openFileSystem(WebFileSystem::Type, long long size, bool create,
    92         WebFileSystemCallbacks*) OVERRIDE;
    93 #endif
    9489    virtual bool allowIndexedDB(const WebString& name) OVERRIDE;
    9590
  • trunk/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp

    r146111 r146299  
    207207}
    208208
    209 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    210209void WorkerFileSystemCallbacksBridge::postOpenFileSystemToMainThread(WebCommonWorkerClient* commonClient, WebFileSystemType type, long long size, bool create, const String& mode)
    211 #else
    212 void WorkerFileSystemCallbacksBridge::postOpenFileSystemToMainThread(WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, bool create, const String& mode)
    213 #endif
    214210{
    215211    dispatchTaskToMainThread(
     
    315311}
    316312
    317 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    318313void WorkerFileSystemCallbacksBridge::openFileSystemOnMainThread(ScriptExecutionContext*, WebCommonWorkerClient* commonClient, WebFileSystemType type, long long size, bool create, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode)
    319 #else
    320 void WorkerFileSystemCallbacksBridge::openFileSystemOnMainThread(ScriptExecutionContext*, WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, bool create, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode)
    321 #endif
    322314{
    323315    if (!commonClient)
  • trunk/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h

    r146111 r146299  
    8686
    8787    // Methods that create an instance and post an initial request task to the main thread. They must be called on the worker thread.
    88 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    8988    void postOpenFileSystemToMainThread(WebCommonWorkerClient*, WebFileSystemType, long long size, bool create, const String& mode);
    90 #else
    91     void postOpenFileSystemToMainThread(WebCommonWorkerClient*, WebFileSystem::Type, long long size, bool create, const String& mode);
    92 #endif
    9389    void postMoveToMainThread(WebFileSystem*, const WebCore::KURL& srcPath, const WebCore::KURL& destPath, const String& mode);
    9490    void postCopyToMainThread(WebFileSystem*, const WebCore::KURL& srcPath, const WebCore::KURL& destPath, const String& mode);
     
    115111
    116112    // Methods that are to be called on the main thread.
    117 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    118113    static void openFileSystemOnMainThread(WebCore::ScriptExecutionContext*, WebCommonWorkerClient*, WebFileSystemType, long long size, bool create, PassRefPtr<WorkerFileSystemCallbacksBridge>, const String& mode);
    119 #else
    120     static void openFileSystemOnMainThread(WebCore::ScriptExecutionContext*, WebCommonWorkerClient*, WebFileSystem::Type, long long size, bool create, PassRefPtr<WorkerFileSystemCallbacksBridge>, const String& mode);
    121 #endif
    122114    static void moveOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& srcPath, const WebCore::KURL& destPath, PassRefPtr<WorkerFileSystemCallbacksBridge>, const String& mode);
    123115    static void copyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& srcPath, const WebCore::KURL& destPath, PassRefPtr<WorkerFileSystemCallbacksBridge>, const String& mode);
  • trunk/Tools/ChangeLog

    r146293 r146299  
     12013-03-19  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        [Chromium] Migrate to WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
     4        https://bugs.webkit.org/show_bug.cgi?id=112754
     5
     6        Reviewed by Darin Fisher.
     7
     8        Remove old code behind ifndef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
     9        now that it's always defined.
     10
     11        * DumpRenderTree/chromium/WebViewHost.cpp:
     12        * DumpRenderTree/chromium/WebViewHost.h:
     13        (WebViewHost):
     14
    1152013-03-19  Kenneth Russell  <kbr@google.com>
    216
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r146139 r146299  
    498498}
    499499
    500 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    501500void WebViewHost::openFileSystem(WebFrame* frame, WebFileSystemType type, long long size, bool create, WebFileSystemCallbacks* callbacks)
    502 #else
    503 void WebViewHost::openFileSystem(WebFrame* frame, WebFileSystem::Type type, long long size, bool create, WebFileSystemCallbacks* callbacks)
    504 #endif
    505501{
    506502    webkit_support::OpenFileSystem(frame, type, size, create, callbacks);
    507503}
    508504
    509 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    510505void WebViewHost::deleteFileSystem(WebKit::WebFrame* frame, WebKit::WebFileSystemType type, WebKit::WebFileSystemCallbacks* callbacks)
    511 #else
    512 void WebViewHost::deleteFileSystem(WebKit::WebFrame* frame, WebKit::WebFileSystem::Type type, WebKit::WebFileSystemCallbacks* callbacks)
    513 #endif
    514506{
    515507    webkit_support::DeleteFileSystem(frame, type, callbacks);
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.h

    r146139 r146299  
    194194    virtual void didNavigateWithinPage(WebKit::WebFrame*, bool isNewNavigation);
    195195    virtual void willSendRequest(WebKit::WebFrame*, unsigned identifier, WebKit::WebURLRequest&, const WebKit::WebURLResponse&);
    196 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
    197196    virtual void openFileSystem(WebKit::WebFrame*, WebKit::WebFileSystemType, long long size, bool create, WebKit::WebFileSystemCallbacks*);
    198197    virtual void deleteFileSystem(WebKit::WebFrame*, WebKit::WebFileSystemType, WebKit::WebFileSystemCallbacks*);
    199 #else
    200     virtual void openFileSystem(WebKit::WebFrame*, WebKit::WebFileSystem::Type, long long size, bool create, WebKit::WebFileSystemCallbacks*);
    201     virtual void deleteFileSystem(WebKit::WebFrame*, WebKit::WebFileSystem::Type, WebKit::WebFileSystemCallbacks*);
    202 #endif
    203198    virtual bool willCheckAndDispatchMessageEvent(
    204199        WebKit::WebFrame* sourceFrame, WebKit::WebFrame* targetFrame,
Note: See TracChangeset for help on using the changeset viewer.