| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_CHILD_APPCACHE_APPCACHE_BACKEND_PROXY_H_ | 5 #ifndef CONTENT_CHILD_APPCACHE_APPCACHE_BACKEND_PROXY_H_ |
| 6 #define CONTENT_CHILD_APPCACHE_APPCACHE_BACKEND_PROXY_H_ | 6 #define CONTENT_CHILD_APPCACHE_APPCACHE_BACKEND_PROXY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "content/common/appcache_interfaces.h" | 12 #include "content/common/appcache_interfaces.h" |
| 11 #include "ipc/ipc_sender.h" | 13 #include "ipc/ipc_sender.h" |
| 12 | 14 |
| 13 namespace content { | 15 namespace content { |
| 14 | 16 |
| 15 // Sends appcache related messages to the main process. | 17 // Sends appcache related messages to the main process. |
| 16 class AppCacheBackendProxy : public AppCacheBackend { | 18 class AppCacheBackendProxy : public AppCacheBackend { |
| 17 public: | 19 public: |
| 18 explicit AppCacheBackendProxy(IPC::Sender* sender) : sender_(sender) {} | 20 explicit AppCacheBackendProxy(IPC::Sender* sender) : sender_(sender) {} |
| 19 | 21 |
| 20 IPC::Sender* sender() const { return sender_; } | 22 IPC::Sender* sender() const { return sender_; } |
| 21 | 23 |
| 22 // AppCacheBackend methods | 24 // AppCacheBackend methods |
| 23 void RegisterHost(int host_id) override; | 25 void RegisterHost(int host_id) override; |
| 24 void UnregisterHost(int host_id) override; | 26 void UnregisterHost(int host_id) override; |
| 25 void SetSpawningHostId(int host_id, int spawning_host_id) override; | 27 void SetSpawningHostId(int host_id, int spawning_host_id) override; |
| 26 void SelectCache(int host_id, | 28 void SelectCache(int host_id, |
| 27 const GURL& document_url, | 29 const GURL& document_url, |
| 28 const int64 cache_document_was_loaded_from, | 30 const int64_t cache_document_was_loaded_from, |
| 29 const GURL& manifest_url) override; | 31 const GURL& manifest_url) override; |
| 30 void SelectCacheForWorker(int host_id, | 32 void SelectCacheForWorker(int host_id, |
| 31 int parent_process_id, | 33 int parent_process_id, |
| 32 int parent_host_id) override; | 34 int parent_host_id) override; |
| 33 void SelectCacheForSharedWorker(int host_id, int64 appcache_id) override; | 35 void SelectCacheForSharedWorker(int host_id, int64_t appcache_id) override; |
| 34 void MarkAsForeignEntry(int host_id, | 36 void MarkAsForeignEntry(int host_id, |
| 35 const GURL& document_url, | 37 const GURL& document_url, |
| 36 int64 cache_document_was_loaded_from) override; | 38 int64_t cache_document_was_loaded_from) override; |
| 37 AppCacheStatus GetStatus(int host_id) override; | 39 AppCacheStatus GetStatus(int host_id) override; |
| 38 bool StartUpdate(int host_id) override; | 40 bool StartUpdate(int host_id) override; |
| 39 bool SwapCache(int host_id) override; | 41 bool SwapCache(int host_id) override; |
| 40 void GetResourceList( | 42 void GetResourceList( |
| 41 int host_id, | 43 int host_id, |
| 42 std::vector<AppCacheResourceInfo>* resource_infos) override; | 44 std::vector<AppCacheResourceInfo>* resource_infos) override; |
| 43 | 45 |
| 44 private: | 46 private: |
| 45 IPC::Sender* sender_; | 47 IPC::Sender* sender_; |
| 46 }; | 48 }; |
| 47 | 49 |
| 48 } // namespace content | 50 } // namespace content |
| 49 | 51 |
| 50 #endif // CONTENT_CHILD_APPCACHE_APPCACHE_BACKEND_PROXY_H_ | 52 #endif // CONTENT_CHILD_APPCACHE_APPCACHE_BACKEND_PROXY_H_ |
| OLD | NEW |