| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 Loading... |
| 32 #include "core/loader/appcache/ApplicationCacheHost.h" | 32 #include "core/loader/appcache/ApplicationCacheHost.h" |
| 33 | 33 |
| 34 #include "WebApplicationCacheHostClient.h" | 34 #include "WebApplicationCacheHostClient.h" |
| 35 #include "WebFrameClient.h" | 35 #include "WebFrameClient.h" |
| 36 #include "WebFrameImpl.h" | 36 #include "WebFrameImpl.h" |
| 37 #include "core/loader/DocumentLoader.h" | 37 #include "core/loader/DocumentLoader.h" |
| 38 #include "public/platform/WebURL.h" | 38 #include "public/platform/WebURL.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class ApplicationCacheHostInternal : public WebKit::WebApplicationCacheHostClien
t { | 42 class ApplicationCacheHostInternal : public blink::WebApplicationCacheHostClient
{ |
| 43 public: | 43 public: |
| 44 ApplicationCacheHostInternal(ApplicationCacheHost* host) | 44 ApplicationCacheHostInternal(ApplicationCacheHost* host) |
| 45 : m_innerHost(host) | 45 : m_innerHost(host) |
| 46 { | 46 { |
| 47 WebKit::WebFrameImpl* webFrame = WebKit::WebFrameImpl::fromFrame(host->m
_documentLoader->frame()); | 47 blink::WebFrameImpl* webFrame = blink::WebFrameImpl::fromFrame(host->m_d
ocumentLoader->frame()); |
| 48 ASSERT(webFrame); | 48 ASSERT(webFrame); |
| 49 m_outerHost = adoptPtr(webFrame->client()->createApplicationCacheHost(we
bFrame, this)); | 49 m_outerHost = adoptPtr(webFrame->client()->createApplicationCacheHost(we
bFrame, this)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 virtual void didChangeCacheAssociation() | 52 virtual void didChangeCacheAssociation() |
| 53 { | 53 { |
| 54 // FIXME: Prod the inspector to update it's notion of what cache the pag
e is using. | 54 // FIXME: Prod the inspector to update it's notion of what cache the pag
e is using. |
| 55 } | 55 } |
| 56 | 56 |
| 57 virtual void notifyEventListener(WebKit::WebApplicationCacheHost::EventID ev
entID) | 57 virtual void notifyEventListener(blink::WebApplicationCacheHost::EventID eve
ntID) |
| 58 { | 58 { |
| 59 m_innerHost->notifyApplicationCache(static_cast<ApplicationCacheHost::Ev
entID>(eventID), 0, 0); | 59 m_innerHost->notifyApplicationCache(static_cast<ApplicationCacheHost::Ev
entID>(eventID), 0, 0); |
| 60 } | 60 } |
| 61 | 61 |
| 62 virtual void notifyProgressEventListener(const WebKit::WebURL&, int progress
Total, int progressDone) | 62 virtual void notifyProgressEventListener(const blink::WebURL&, int progressT
otal, int progressDone) |
| 63 { | 63 { |
| 64 m_innerHost->notifyApplicationCache(ApplicationCacheHost::PROGRESS_EVENT
, progressTotal, progressDone); | 64 m_innerHost->notifyApplicationCache(ApplicationCacheHost::PROGRESS_EVENT
, progressTotal, progressDone); |
| 65 } | 65 } |
| 66 | 66 |
| 67 static WebKit::WebApplicationCacheHost* toWebApplicationCacheHost(Applicatio
nCacheHost* innerHost) | 67 static blink::WebApplicationCacheHost* toWebApplicationCacheHost(Application
CacheHost* innerHost) |
| 68 { | 68 { |
| 69 if (innerHost && innerHost->m_internal) | 69 if (innerHost && innerHost->m_internal) |
| 70 return innerHost->m_internal->m_outerHost.get(); | 70 return innerHost->m_internal->m_outerHost.get(); |
| 71 return 0; | 71 return 0; |
| 72 } | 72 } |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 friend class ApplicationCacheHost; | 75 friend class ApplicationCacheHost; |
| 76 ApplicationCacheHost* m_innerHost; | 76 ApplicationCacheHost* m_innerHost; |
| 77 OwnPtr<WebKit::WebApplicationCacheHost> m_outerHost; | 77 OwnPtr<blink::WebApplicationCacheHost> m_outerHost; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } | 80 } |
| OLD | NEW |