Changeset 47018 in webkit


Ignore:
Timestamp:
Aug 10, 2009 8:49:47 PM (15 years ago)
Author:
jorlow@chromium.org
Message:

2009-08-07 Michael Nordman <Michael Nordman>

Reviewed by Darin Fisher.

https://bugs.webkit.org/show_bug.cgi?id=28087

Mods for a chrome specific impl of ApplicationCacheHost.

  • The public section of the interface is the same, but we use PLATFORM(CHROMIUM) to identify which parts of the private section are shared. The chrome specific internals are encapsulated in a seperate ApplicationCacheHostInternal class. WebCore common code only contains a forward reference to this class.
  • Cleanup a couple of stale comments.
  • Have window.applicationCache return null to script when the feature is disabled in the preferences.


No new tests.

  • loader/appcache/ApplicationCacheHost.cpp:
  • loader/appcache/ApplicationCacheHost.h: (WebCore::ApplicationCacheHost::documentLoader):
  • page/DOMWindow.cpp: (WebCore::DOMWindow::applicationCache):

<<<<<<< .mine

Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r47016 r47018  
     12009-08-07  Michael Nordman  <michaeln@google.com>
     2
     3        Reviewed by Darin Fisher.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=28087
     6
     7        Mods for a chrome specific impl of ApplicationCacheHost.
     8
     9        * The public section of the interface is the same, but we use
     10        PLATFORM(CHROMIUM) to identify which parts of the private
     11        section are shared. The chrome specific internals are encapsulated
     12        in a seperate ApplicationCacheHostInternal class. WebCore common
     13        code only contains a forward reference to this class.
     14
     15        * Cleanup a couple of stale comments.
     16
     17        * Have window.applicationCache return null to script when the
     18        feature is disabled in the preferences.
     19       
     20        No new tests.
     21
     22        * loader/appcache/ApplicationCacheHost.cpp:
     23        * loader/appcache/ApplicationCacheHost.h:
     24        (WebCore::ApplicationCacheHost::documentLoader):
     25        * page/DOMWindow.cpp:
     26        (WebCore::DOMWindow::applicationCache):
     27
     28<<<<<<< .mine
     292009-08-10  Michael Nordman  <michaeln@google.com>
     30
     31        Reviewed by Darin Fisher.
     32
     33        Mods for a chrome specific impl of ApplicationCacheHost.
     34        https://bugs.webkit.org/show_bug.cgi?id=28087
     35
     36        * The public section of the interface is the same, but we use
     37        PLATFORM(CHROMIUM) to identify which parts of the private
     38        section are shared. The chrome specific internals are encapsulated
     39        in a seperate ApplicationCacheHostInternal class. WebCore common
     40        code only contains a forward reference to this class.
     41
     42        * Cleanup a couple of stale comments.
     43
     44        * Have window.applicationCache return null to script when the
     45        feature is disabled in the preferences.
     46
     47        * loader/appcache/ApplicationCacheHost.cpp:
     48        * loader/appcache/ApplicationCacheHost.h:
     49        (WebCore::ApplicationCacheHost::documentLoader):
     50        * page/DOMWindow.cpp:
     51        (WebCore::DOMWindow::applicationCache):
     52
     53=======
    1542009-08-10  Crystal Zhang  <crystal.zhang@staikos.net>
    255
     
    16191672        * WebCore.xcodeproj/project.pbxproj:
    16201673
     1674>>>>>>> .r47014
    162116752009-08-06  Fumitoshi Ukai  <ukai@chromium.org>
    16221676
  • trunk/WebCore/loader/appcache/ApplicationCacheHost.cpp

    r46786 r47018  
    379379}  // namespace WebCore
    380380
    381 #endif  // ENABLE(APPLICATION_CACHE)
     381#endif  // ENABLE(OFFLINE_WEB_APPLICATIONS)
  • trunk/WebCore/loader/appcache/ApplicationCacheHost.h

    r46786 r47018  
    3434#if ENABLE(OFFLINE_WEB_APPLICATIONS)
    3535
     36#include <wtf/OwnPtr.h>
    3637#include <wtf/PassRefPtr.h>
    3738#include <wtf/RefPtr.h>
     
    4041namespace WebCore {
    4142
    42     class ApplicationCache;
    43     class ApplicationCacheGroup;
    44     class ApplicationCacheResource;
    45     class ApplicationCacheStorage;
    4643    class DOMApplicationCache;
    4744    class DocumentLoader;
     
    5249    class ResourceResponse;
    5350    class SubstituteData;
     51#if PLATFORM(CHROMIUM)
     52    class ApplicationCacheHostInternal;
     53#else
     54    class ApplicationCache;
     55    class ApplicationCacheGroup;
     56    class ApplicationCacheResource;
     57    class ApplicationCacheStorage;
     58#endif
    5459
    5560    class ApplicationCacheHost {
     
    105110        void setDOMApplicationCache(DOMApplicationCache* domApplicationCache);
    106111        void notifyEventListener(EventID id);
    107        
     112
    108113    private:
     114        bool isApplicationCacheEnabled();
     115        DocumentLoader* documentLoader() { return m_documentLoader; }
     116
     117        DOMApplicationCache* m_domApplicationCache;
     118        DocumentLoader* m_documentLoader;
     119
     120#if PLATFORM(CHROMIUM)
     121        friend class ApplicationCacheHostInternal;
     122        OwnPtr<ApplicationCacheHostInternal> m_internal;
     123#else
    109124        friend class ApplicationCacheGroup;
    110125        friend class ApplicationCacheStorage;
     
    119134        ApplicationCache* mainResourceApplicationCache() const { return m_mainResourceApplicationCache.get(); }
    120135
    121         bool isApplicationCacheEnabled();
    122         DocumentLoader* documentLoader() { return m_documentLoader; }
    123 
    124         DOMApplicationCache* m_domApplicationCache;
    125         DocumentLoader* m_documentLoader;
    126136
    127137        // The application cache that the document loader is associated with (if any).
     
    134144        // This is the application cache the main resource was loaded from (if any).
    135145        RefPtr<ApplicationCache> m_mainResourceApplicationCache;
     146#endif
    136147    };
    137148
    138149}  // namespace WebCore
    139150
    140 #endif  // ENABLE(APPLICATION_CACHE)
    141 #endif  // ApplicationCacheFrontend_h
     151#endif  // ENABLE(OFFLINE_WEB_APPLICATIONS)
     152#endif  // ApplicationCacheHost_h
  • trunk/WebCore/page/DOMWindow.cpp

    r46874 r47018  
    523523DOMApplicationCache* DOMWindow::applicationCache() const
    524524{
    525     if (!m_applicationCache)
     525    if (!m_applicationCache && m_frame && m_frame->settings() && m_frame->settings()->offlineWebApplicationCacheEnabled())
    526526        m_applicationCache = DOMApplicationCache::create(m_frame);
    527527    return m_applicationCache.get();
Note: See TracChangeset for help on using the changeset viewer.