Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_ | 5 #ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_ |
| 6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_ | 6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/process.h" | 9 #include "base/process.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| 11 #include "base/tracked.h" | 11 #include "base/tracked.h" |
| 12 #include "chrome/browser/in_process_webkit/dom_storage_area.h" | 12 #include "chrome/browser/in_process_webkit/dom_storage_area.h" |
| 13 #include "chrome/browser/in_process_webkit/webkit_context.h" | 13 #include "chrome/browser/in_process_webkit/webkit_context.h" |
| 14 #include "chrome/common/dom_storage_common.h" | 14 #include "chrome/common/dom_storage_common.h" |
| 15 #include "ipc/ipc_message.h" | 15 #include "ipc/ipc_message.h" |
| 16 | 16 |
| 17 class DOMStorageContext; | 17 class DOMStorageContext; |
| 18 class GURL; | 18 class GURL; |
| 19 class HostContentSettingsMap; | 19 class HostContentSettingsMap; |
| 20 class ResourceMessageFilter; | 20 class ResourceMessageFilter; |
| 21 class Task; | 21 class Task; |
| 22 struct ViewMsg_DOMStorageEvent_Params; | 22 struct ViewMsg_DOMStorageEvent_Params; |
| 23 | 23 |
| 24 // This class handles the logistics of DOM Storage within the browser process. | 24 // This class handles the logistics of DOM Storage within the browser process. |
| 25 // It mostly ferries information between IPCs and the WebKit implementations, | 25 // It mostly ferries information between IPCs and the WebKit implementations, |
| 26 // but it also handles some special cases like when renderer processes die. | 26 // but it also handles some special cases like when renderer processes die. |
| 27 class DOMStorageDispatcherHost | 27 class DOMStorageDispatcherHost |
| 28 : public base::RefCountedThreadSafe<DOMStorageDispatcherHost> { | 28 : public base::RefCountedThreadSafe<DOMStorageDispatcherHost> { |
| 29 public: | 29 public: |
| 30 // Only call the constructor from the UI thread. | 30 // Only call the constructor from the UI thread. |
| 31 DOMStorageDispatcherHost( | 31 DOMStorageDispatcherHost( |
| 32 ResourceMessageFilter* resource_message_filter_, | 32 ResourceMessageFilter* resource_message_filter, |
|
Nico
2010/07/31 15:17:46
wow
| |
| 33 WebKitContext* webkit_context); | 33 WebKitContext* webkit_context); |
| 34 | 34 |
| 35 // Only call from ResourceMessageFilter on the IO thread. | 35 // Only call from ResourceMessageFilter on the IO thread. |
| 36 void Init(int process_id, base::ProcessHandle process_handle); | 36 void Init(int process_id, base::ProcessHandle process_handle); |
| 37 | 37 |
| 38 // Only call from ResourceMessageFilter on the IO thread. Calls self on the | 38 // Only call from ResourceMessageFilter on the IO thread. Calls self on the |
| 39 // WebKit thread in some cases. | 39 // WebKit thread in some cases. |
| 40 void Shutdown(); | 40 void Shutdown(); |
| 41 | 41 |
| 42 // Only call from ResourceMessageFilter on the IO thread. | 42 // Only call from ResourceMessageFilter on the IO thread. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 // handle. | 108 // handle. |
| 109 base::ProcessHandle process_handle_; | 109 base::ProcessHandle process_handle_; |
| 110 | 110 |
| 111 // Used to dispatch messages to the correct view host. | 111 // Used to dispatch messages to the correct view host. |
| 112 int process_id_; | 112 int process_id_; |
| 113 | 113 |
| 114 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageDispatcherHost); | 114 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageDispatcherHost); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_ | 117 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_ |
| OLD | NEW |