| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_APPCACHE_WEB_APPLICATION_CACHE_HOST_IMPL_H_ | 5 #ifndef WEBKIT_APPCACHE_WEB_APPLICATION_CACHE_HOST_IMPL_H_ |
| 6 #define WEBKIT_APPCACHE_WEB_APPLICATION_CACHE_HOST_IMPL_H_ | 6 #define WEBKIT_APPCACHE_WEB_APPLICATION_CACHE_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebApplicationCacheHo
stClient.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebApplicationCacheHo
stClient.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" |
| 14 #include "webkit/appcache/appcache_interfaces.h" | 14 #include "webkit/appcache/appcache_interfaces.h" |
| 15 | 15 |
| 16 namespace WebKit { | 16 namespace WebKit { |
| 17 class WebFrame; | 17 class WebFrame; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace appcache { | 20 namespace appcache { |
| 21 | 21 |
| 22 class WebApplicationCacheHostImpl : public WebKit::WebApplicationCacheHost { | 22 class WebApplicationCacheHostImpl : public WebKit::WebApplicationCacheHost { |
| 23 public: | 23 public: |
| 24 // Returns the host having given id or NULL if there is no such host. | 24 // Returns the host having given id or NULL if there is no such host. |
| 25 static WebApplicationCacheHostImpl* FromId(int id); | 25 static WebApplicationCacheHostImpl* FromId(int id); |
| 26 | 26 |
| 27 // Returns the host associated with the current document in frame. | 27 // Returns the host associated with the current document in frame. |
| 28 static WebApplicationCacheHostImpl* FromFrame(WebKit::WebFrame* frame); | 28 static WebApplicationCacheHostImpl* FromFrame(const WebKit::WebFrame* frame); |
| 29 | 29 |
| 30 WebApplicationCacheHostImpl(WebKit::WebApplicationCacheHostClient* client, | 30 WebApplicationCacheHostImpl(WebKit::WebApplicationCacheHostClient* client, |
| 31 AppCacheBackend* backend); | 31 AppCacheBackend* backend); |
| 32 virtual ~WebApplicationCacheHostImpl(); | 32 virtual ~WebApplicationCacheHostImpl(); |
| 33 | 33 |
| 34 int host_id() const { return host_id_; } | 34 int host_id() const { return host_id_; } |
| 35 AppCacheBackend* backend() const { return backend_; } | 35 AppCacheBackend* backend() const { return backend_; } |
| 36 WebKit::WebApplicationCacheHostClient* client() const { return client_; } | 36 WebKit::WebApplicationCacheHostClient* client() const { return client_; } |
| 37 | 37 |
| 38 virtual void OnCacheSelected(const appcache::AppCacheInfo& info); | 38 virtual void OnCacheSelected(const appcache::AppCacheInfo& info); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 IsNewMasterEntry is_new_master_entry_; | 76 IsNewMasterEntry is_new_master_entry_; |
| 77 appcache::AppCacheInfo cache_info_; | 77 appcache::AppCacheInfo cache_info_; |
| 78 GURL original_main_resource_url_; // Used to detect redirection. | 78 GURL original_main_resource_url_; // Used to detect redirection. |
| 79 bool was_select_cache_called_; | 79 bool was_select_cache_called_; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace | 82 } // namespace |
| 83 | 83 |
| 84 #endif // WEBKIT_APPCACHE_WEB_APPLICATION_CACHE_HOST_IMPL_H_ | 84 #endif // WEBKIT_APPCACHE_WEB_APPLICATION_CACHE_HOST_IMPL_H_ |
| 85 | 85 |
| OLD | NEW |