Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: Source/core/loader/appcache/ApplicationCacheHost.h

Issue 22802012: Rename DOMApplicationCache to ApplicationCache and expose it to JS (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove change to devtools and fix nits Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #define ApplicationCacheHost_h 32 #define ApplicationCacheHost_h
33 33
34 #include "weborigin/KURL.h" 34 #include "weborigin/KURL.h"
35 #include "wtf/Deque.h" 35 #include "wtf/Deque.h"
36 #include "wtf/OwnPtr.h" 36 #include "wtf/OwnPtr.h"
37 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
38 #include "wtf/RefPtr.h" 38 #include "wtf/RefPtr.h"
39 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 class DOMApplicationCache; 42 class ApplicationCache;
43 class DocumentLoader; 43 class DocumentLoader;
44 class Frame; 44 class Frame;
45 class ResourceLoader; 45 class ResourceLoader;
46 class ResourceError; 46 class ResourceError;
47 class ResourceRequest; 47 class ResourceRequest;
48 class ResourceResponse; 48 class ResourceResponse;
49 class SubstituteData; 49 class SubstituteData;
50 class ApplicationCacheHostInternal; 50 class ApplicationCacheHostInternal;
51 51
52 class ApplicationCacheHost { 52 class ApplicationCacheHost {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void failedLoadingMainResource(); 118 void failedLoadingMainResource();
119 119
120 void willStartLoadingResource(ResourceRequest&); 120 void willStartLoadingResource(ResourceRequest&);
121 void willStartLoadingSynchronously(ResourceRequest&); 121 void willStartLoadingSynchronously(ResourceRequest&);
122 122
123 Status status() const; 123 Status status() const;
124 bool update(); 124 bool update();
125 bool swapCache(); 125 bool swapCache();
126 void abort(); 126 void abort();
127 127
128 void setDOMApplicationCache(DOMApplicationCache*); 128 void setApplicationCache(ApplicationCache*);
129 void notifyDOMApplicationCache(EventID, int progressTotal, int progressD one); 129 void notifyApplicationCache(EventID, int progressTotal, int progressDone );
130 130
131 void stopDeferringEvents(); // Also raises the events that have been que ued up. 131 void stopDeferringEvents(); // Also raises the events that have been que ued up.
132 132
133 void fillResourceList(ResourceInfoList*); 133 void fillResourceList(ResourceInfoList*);
134 CacheInfo applicationCacheInfo(); 134 CacheInfo applicationCacheInfo();
135 135
136 private: 136 private:
137 bool isApplicationCacheEnabled(); 137 bool isApplicationCacheEnabled();
138 DocumentLoader* documentLoader() const { return m_documentLoader; } 138 DocumentLoader* documentLoader() const { return m_documentLoader; }
139 139
140 struct DeferredEvent { 140 struct DeferredEvent {
141 EventID eventID; 141 EventID eventID;
142 int progressTotal; 142 int progressTotal;
143 int progressDone; 143 int progressDone;
144 DeferredEvent(EventID id, int total, int done) : eventID(id), progre ssTotal(total), progressDone(done) { } 144 DeferredEvent(EventID id, int total, int done) : eventID(id), progre ssTotal(total), progressDone(done) { }
145 }; 145 };
146 146
147 DOMApplicationCache* m_domApplicationCache; 147 ApplicationCache* m_domApplicationCache;
148 DocumentLoader* m_documentLoader; 148 DocumentLoader* m_documentLoader;
149 bool m_defersEvents; // Events are deferred until after document onload. 149 bool m_defersEvents; // Events are deferred until after document onload.
150 Vector<DeferredEvent> m_deferredEvents; 150 Vector<DeferredEvent> m_deferredEvents;
151 151
152 void dispatchDOMEvent(EventID, int progressTotal, int progressDone); 152 void dispatchDOMEvent(EventID, int progressTotal, int progressDone);
153 153
154 friend class ApplicationCacheHostInternal; 154 friend class ApplicationCacheHostInternal;
155 OwnPtr<ApplicationCacheHostInternal> m_internal; 155 OwnPtr<ApplicationCacheHostInternal> m_internal;
156 }; 156 };
157 157
158 } // namespace WebCore 158 } // namespace WebCore
159 159
160 #endif // ApplicationCacheHost_h 160 #endif // ApplicationCacheHost_h
OLDNEW
« no previous file with comments | « Source/core/loader/appcache/ApplicationCache.idl ('k') | Source/core/loader/appcache/DOMApplicationCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698