Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h

Issue 402049: Revert my last... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // 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 7
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/tracked.h" 10 #include "base/tracked.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void OnClear(int64 storage_area_id, const GURL& url); 69 void OnClear(int64 storage_area_id, const GURL& url);
70 70
71 // Only call on the IO thread. 71 // Only call on the IO thread.
72 void OnStorageEvent(const ViewMsg_DOMStorageEvent_Params& params); 72 void OnStorageEvent(const ViewMsg_DOMStorageEvent_Params& params);
73 73
74 // A shortcut for accessing our context. 74 // A shortcut for accessing our context.
75 DOMStorageContext* Context() { 75 DOMStorageContext* Context() {
76 return webkit_context_->dom_storage_context(); 76 return webkit_context_->dom_storage_context();
77 } 77 }
78 78
79 // Posts a task to the WebKit thread, initializing it if necessary.
80 void PostTaskToWebKitThread(
81 const tracked_objects::Location& from_here, Task* task);
82
79 // Use whenever there's a chance OnStorageEvent will be called. 83 // Use whenever there's a chance OnStorageEvent will be called.
80 class ScopedStorageEventContext { 84 class ScopedStorageEventContext {
81 public: 85 public:
82 ScopedStorageEventContext(DOMStorageDispatcherHost* dispatcher_host, 86 ScopedStorageEventContext(DOMStorageDispatcherHost* dispatcher_host,
83 const GURL* url); 87 const GURL* url);
84 ~ScopedStorageEventContext(); 88 ~ScopedStorageEventContext();
85 }; 89 };
86 90
87 // Only access on the WebKit thread! Used for storage events. 91 // Only access on the WebKit thread! Used for storage events.
88 static DOMStorageDispatcherHost* storage_event_host_; 92 static DOMStorageDispatcherHost* storage_event_host_;
89 static const GURL* storage_event_url_; 93 static const GURL* storage_event_url_;
90 94
91 // Data shared between renderer processes with the same profile. 95 // Data shared between renderer processes with the same profile.
92 scoped_refptr<WebKitContext> webkit_context_; 96 scoped_refptr<WebKitContext> webkit_context_;
93 97
94 // ResourceDispatcherHost takes care of destruction. Immutable. 98 // ResourceDispatcherHost takes care of destruction. Immutable.
95 WebKitThread* webkit_thread_; 99 WebKitThread* webkit_thread_;
96 100
97 // Only set on the IO thread. 101 // Only set on the IO thread.
98 IPC::Message::Sender* message_sender_; 102 IPC::Message::Sender* message_sender_;
99 103
100 // If we get a corrupt message from a renderer, we need to kill it using this 104 // If we get a corrupt message from a renderer, we need to kill it using this
101 // handle. 105 // handle.
102 base::ProcessHandle process_handle_; 106 base::ProcessHandle process_handle_;
103 107
104 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageDispatcherHost); 108 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageDispatcherHost);
105 }; 109 };
106 110
107 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_ 111 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698