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

Side by Side Diff: content/common/child_thread.h

Issue 8747002: Dispatch IndexedDB IPC messages to worker threads (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | content/common/child_thread.cc » ('j') | content/renderer/indexed_db_dispatcher.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CONTENT_COMMON_CHILD_THREAD_H_ 5 #ifndef CONTENT_COMMON_CHILD_THREAD_H_
6 #define CONTENT_COMMON_CHILD_THREAD_H_ 6 #define CONTENT_COMMON_CHILD_THREAD_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/shared_memory.h" 11 #include "base/shared_memory.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/message_router.h" 13 #include "content/common/message_router.h"
14 #include "webkit/glue/resource_loader_bridge.h" 14 #include "webkit/glue/resource_loader_bridge.h"
15 15
16 class FileSystemDispatcher; 16 class FileSystemDispatcher;
17 class IndexedDBDispatcher;
18 class IndexedDBMessageFilter;
17 class MessageLoop; 19 class MessageLoop;
18 class QuotaDispatcher; 20 class QuotaDispatcher;
19 class ResourceDispatcher; 21 class ResourceDispatcher;
20 class SocketStreamDispatcher; 22 class SocketStreamDispatcher;
23 class WebCoreWorkerTracker;
21 24
22 namespace IPC { 25 namespace IPC {
23 class SyncChannel; 26 class SyncChannel;
24 class SyncMessageFilter; 27 class SyncMessageFilter;
25 } 28 }
26 29
27 // The main thread of a child process derives from this class. 30 // The main thread of a child process derives from this class.
28 class CONTENT_EXPORT ChildThread : public IPC::Channel::Listener, 31 class CONTENT_EXPORT ChildThread : public IPC::Channel::Listener,
29 public IPC::Message::Sender { 32 public IPC::Message::Sender {
30 public: 33 public:
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 75
73 // Safe to call on any thread, as long as it's guaranteed that the thread's 76 // Safe to call on any thread, as long as it's guaranteed that the thread's
74 // lifetime is less than the main thread. 77 // lifetime is less than the main thread.
75 IPC::SyncMessageFilter* sync_message_filter(); 78 IPC::SyncMessageFilter* sync_message_filter();
76 79
77 MessageLoop* message_loop(); 80 MessageLoop* message_loop();
78 81
79 // Returns the one child thread. 82 // Returns the one child thread.
80 static ChildThread* current(); 83 static ChildThread* current();
81 84
85 IndexedDBDispatcher* indexed_db_dispatcher() const;
86 WebCoreWorkerTracker* webcore_worker_tracker() const;
87
82 protected: 88 protected:
83 friend class ChildProcess; 89 friend class ChildProcess;
84 90
85 // Called when the process refcount is 0. 91 // Called when the process refcount is 0.
86 void OnProcessFinalRelease(); 92 void OnProcessFinalRelease();
87 93
88 virtual bool OnControlMessageReceived(const IPC::Message& msg); 94 virtual bool OnControlMessageReceived(const IPC::Message& msg);
89 virtual void OnAskBeforeShutdown(); 95 virtual void OnAskBeforeShutdown();
90 virtual void OnShutdown(); 96 virtual void OnShutdown();
91 97
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // The OnChannelError() callback was invoked - the channel is dead, don't 135 // The OnChannelError() callback was invoked - the channel is dead, don't
130 // attempt to communicate. 136 // attempt to communicate.
131 bool on_channel_error_called_; 137 bool on_channel_error_called_;
132 138
133 MessageLoop* message_loop_; 139 MessageLoop* message_loop_;
134 140
135 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; 141 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_;
136 142
137 scoped_ptr<QuotaDispatcher> quota_dispatcher_; 143 scoped_ptr<QuotaDispatcher> quota_dispatcher_;
138 144
145 scoped_refptr<IndexedDBMessageFilter> idb_message_filter_;
146
139 DISALLOW_COPY_AND_ASSIGN(ChildThread); 147 DISALLOW_COPY_AND_ASSIGN(ChildThread);
140 }; 148 };
141 149
142 #endif // CONTENT_COMMON_CHILD_THREAD_H_ 150 #endif // CONTENT_COMMON_CHILD_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/child_thread.cc » ('j') | content/renderer/indexed_db_dispatcher.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698