Changeset 47018 in webkit
- Timestamp:
- Aug 10, 2009 8:49:47 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r47016 r47018 1 2009-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 29 2009-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 ======= 1 54 2009-08-10 Crystal Zhang <crystal.zhang@staikos.net> 2 55 … … 1619 1672 * WebCore.xcodeproj/project.pbxproj: 1620 1673 1674 >>>>>>> .r47014 1621 1675 2009-08-06 Fumitoshi Ukai <ukai@chromium.org> 1622 1676 -
trunk/WebCore/loader/appcache/ApplicationCacheHost.cpp
r46786 r47018 379 379 } // namespace WebCore 380 380 381 #endif // ENABLE( APPLICATION_CACHE)381 #endif // ENABLE(OFFLINE_WEB_APPLICATIONS) -
trunk/WebCore/loader/appcache/ApplicationCacheHost.h
r46786 r47018 34 34 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 35 35 36 #include <wtf/OwnPtr.h> 36 37 #include <wtf/PassRefPtr.h> 37 38 #include <wtf/RefPtr.h> … … 40 41 namespace WebCore { 41 42 42 class ApplicationCache;43 class ApplicationCacheGroup;44 class ApplicationCacheResource;45 class ApplicationCacheStorage;46 43 class DOMApplicationCache; 47 44 class DocumentLoader; … … 52 49 class ResourceResponse; 53 50 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 54 59 55 60 class ApplicationCacheHost { … … 105 110 void setDOMApplicationCache(DOMApplicationCache* domApplicationCache); 106 111 void notifyEventListener(EventID id); 107 112 108 113 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 109 124 friend class ApplicationCacheGroup; 110 125 friend class ApplicationCacheStorage; … … 119 134 ApplicationCache* mainResourceApplicationCache() const { return m_mainResourceApplicationCache.get(); } 120 135 121 bool isApplicationCacheEnabled();122 DocumentLoader* documentLoader() { return m_documentLoader; }123 124 DOMApplicationCache* m_domApplicationCache;125 DocumentLoader* m_documentLoader;126 136 127 137 // The application cache that the document loader is associated with (if any). … … 134 144 // This is the application cache the main resource was loaded from (if any). 135 145 RefPtr<ApplicationCache> m_mainResourceApplicationCache; 146 #endif 136 147 }; 137 148 138 149 } // namespace WebCore 139 150 140 #endif // ENABLE( APPLICATION_CACHE)141 #endif // ApplicationCache Frontend_h151 #endif // ENABLE(OFFLINE_WEB_APPLICATIONS) 152 #endif // ApplicationCacheHost_h -
trunk/WebCore/page/DOMWindow.cpp
r46874 r47018 523 523 DOMApplicationCache* DOMWindow::applicationCache() const 524 524 { 525 if (!m_applicationCache )525 if (!m_applicationCache && m_frame && m_frame->settings() && m_frame->settings()->offlineWebApplicationCacheEnabled()) 526 526 m_applicationCache = DOMApplicationCache::create(m_frame); 527 527 return m_applicationCache.get();
Note: See TracChangeset
for help on using the changeset viewer.