| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_ | 5 #ifndef CHROME_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_ |
| 6 #define CHROME_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_ | 6 #define CHROME_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/process.h" | 11 #include "base/process.h" |
| 12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
| 13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 14 #include "chrome/browser/appcache/appcache_frontend_proxy.h" | 14 #include "chrome/browser/appcache/appcache_frontend_proxy.h" |
| 15 #include "chrome/browser/browser_message_filter.h" | 15 #include "chrome/browser/browser_message_filter.h" |
| 16 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 16 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
| 17 #include "ipc/ipc_message.h" | 17 #include "ipc/ipc_message.h" |
| 18 #include "webkit/appcache/appcache_backend_impl.h" | 18 #include "webkit/appcache/appcache_backend_impl.h" |
| 19 | 19 |
| 20 class ChromeAppCacheService; | 20 class ChromeAppCacheService; |
| 21 class URLRequestContext; | 21 class URLRequestContext; |
| 22 class URLRequestContextGetter; | 22 class URLRequestContextGetter; |
| 23 | 23 |
| 24 // Handles appcache related messages sent to the main browser process from | 24 // Handles appcache related messages sent to the main browser process from |
| 25 // its child processes. There is a distinct host for each child process. | 25 // its child processes. There is a distinct host for each child process. |
| 26 // Messages are handled on the IO thread. The ResourceMessageFilter and | 26 // Messages are handled on the IO thread. The BrowserRenderProcessHost and |
| 27 // WorkerProcessHost create an instance and delegates calls to it. | 27 // WorkerProcessHost create an instance and delegates calls to it. |
| 28 class AppCacheDispatcherHost : public BrowserMessageFilter { | 28 class AppCacheDispatcherHost : public BrowserMessageFilter { |
| 29 public: | 29 public: |
| 30 // Constructor for use on the IO thread. | 30 // Constructor for use on the IO thread. |
| 31 AppCacheDispatcherHost(URLRequestContext* request_context, | 31 AppCacheDispatcherHost(URLRequestContext* request_context, |
| 32 int process_id); | 32 int process_id); |
| 33 | 33 |
| 34 // Constructor for use on the UI thread. | 34 // Constructor for use on the UI thread. |
| 35 AppCacheDispatcherHost(URLRequestContextGetter* request_context_getter, | 35 AppCacheDispatcherHost(URLRequestContextGetter* request_context_getter, |
| 36 int process_id); | 36 int process_id); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 scoped_ptr<appcache::SwapCacheCallback> swap_cache_callback_; | 82 scoped_ptr<appcache::SwapCacheCallback> swap_cache_callback_; |
| 83 scoped_ptr<IPC::Message> pending_reply_msg_; | 83 scoped_ptr<IPC::Message> pending_reply_msg_; |
| 84 | 84 |
| 85 // The corresponding ChildProcessHost object's id(). | 85 // The corresponding ChildProcessHost object's id(). |
| 86 int process_id_; | 86 int process_id_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(AppCacheDispatcherHost); | 88 DISALLOW_COPY_AND_ASSIGN(AppCacheDispatcherHost); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 #endif // CHROME_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_ | 91 #endif // CHROME_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_ |
| OLD | NEW |