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

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

Issue 186193005: Move resource_loader_bridge to content/public/child/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHILD_THREAD_H_ 5 #ifndef CONTENT_CHILD_CHILD_THREAD_H_
6 #define CONTENT_CHILD_CHILD_THREAD_H_ 6 #define CONTENT_CHILD_CHILD_THREAD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/shared_memory.h" 12 #include "base/memory/shared_memory.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/power_monitor/power_monitor.h" 14 #include "base/power_monitor/power_monitor.h"
15 #include "base/tracked_objects.h" 15 #include "base/tracked_objects.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/common/message_router.h" 17 #include "content/common/message_router.h"
18 #include "content/public/child/resource_loader_bridge.h"
18 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. 19 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
19 #include "webkit/child/resource_loader_bridge.h"
20 20
21 namespace base { 21 namespace base {
22 class MessageLoop; 22 class MessageLoop;
23 23
24 namespace debug { 24 namespace debug {
25 class TraceMemoryController; 25 class TraceMemoryController;
26 } // namespace debug 26 } // namespace debug
27 } // namespace base 27 } // namespace base
28 28
29 namespace IPC { 29 namespace IPC {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 virtual bool Send(IPC::Message* msg) OVERRIDE; 67 virtual bool Send(IPC::Message* msg) OVERRIDE;
68 68
69 // See documentation on MessageRouter for AddRoute and RemoveRoute 69 // See documentation on MessageRouter for AddRoute and RemoveRoute
70 void AddRoute(int32 routing_id, IPC::Listener* listener); 70 void AddRoute(int32 routing_id, IPC::Listener* listener);
71 void RemoveRoute(int32 routing_id); 71 void RemoveRoute(int32 routing_id);
72 72
73 IPC::SyncChannel* channel() { return channel_.get(); } 73 IPC::SyncChannel* channel() { return channel_.get(); }
74 74
75 // Creates a ResourceLoaderBridge. 75 // Creates a ResourceLoaderBridge.
76 // Tests can override this method if they want a custom loading behavior. 76 // Tests can override this method if they want a custom loading behavior.
77 virtual webkit_glue::ResourceLoaderBridge* CreateBridge( 77 virtual ResourceLoaderBridge* CreateBridge(
78 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info); 78 const ResourceLoaderBridge::RequestInfo& request_info);
79 79
80 // Allocates a block of shared memory of the given size and 80 // Allocates a block of shared memory of the given size and
81 // maps in into the address space. Returns NULL of failure. 81 // maps in into the address space. Returns NULL of failure.
82 // Note: On posix, this requires a sync IPC to the browser process, 82 // Note: On posix, this requires a sync IPC to the browser process,
83 // but on windows the child process directly allocates the block. 83 // but on windows the child process directly allocates the block.
84 base::SharedMemory* AllocateSharedMemory(size_t buf_size); 84 base::SharedMemory* AllocateSharedMemory(size_t buf_size);
85 85
86 // A static variant that can be called on background threads provided 86 // A static variant that can be called on background threads provided
87 // the |sender| passed in is safe to use on background threads. 87 // the |sender| passed in is safe to use on background threads.
88 static base::SharedMemory* AllocateSharedMemory(size_t buf_size, 88 static base::SharedMemory* AllocateSharedMemory(size_t buf_size,
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 scoped_ptr<base::PowerMonitor> power_monitor_; 228 scoped_ptr<base::PowerMonitor> power_monitor_;
229 229
230 bool in_browser_process_; 230 bool in_browser_process_;
231 231
232 DISALLOW_COPY_AND_ASSIGN(ChildThread); 232 DISALLOW_COPY_AND_ASSIGN(ChildThread);
233 }; 233 };
234 234
235 } // namespace content 235 } // namespace content
236 236
237 #endif // CONTENT_CHILD_CHILD_THREAD_H_ 237 #endif // CONTENT_CHILD_CHILD_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698