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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 10837230: Move StoragePartition into content/public and remove BrowserContext::GetDOMStorageContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style fixes. Created 8 years, 4 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_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/process.h" 13 #include "base/process.h"
14 #include "base/timer.h" 14 #include "base/timer.h"
15 #include "content/browser/child_process_launcher.h" 15 #include "content/browser/child_process_launcher.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/public/browser/render_process_host.h" 17 #include "content/public/browser/render_process_host.h"
18 #include "ipc/ipc_channel_proxy.h" 18 #include "ipc/ipc_channel_proxy.h"
19 #include "ui/surface/transport_dib.h" 19 #include "ui/surface/transport_dib.h"
20 20
21 class CommandLine; 21 class CommandLine;
22 22
23 namespace content { 23 namespace content {
24 class GpuMessageFilter; 24 class GpuMessageFilter;
25 class RendererMainThread; 25 class RendererMainThread;
26 class RenderWidgetHelper; 26 class RenderWidgetHelper;
27 class RenderWidgetHost; 27 class RenderWidgetHost;
28 class RenderWidgetHostImpl; 28 class RenderWidgetHostImpl;
29 class StoragePartitionImpl;
29 30
30 // Implements a concrete RenderProcessHost for the browser process for talking 31 // Implements a concrete RenderProcessHost for the browser process for talking
31 // to actual renderer processes (as opposed to mocks). 32 // to actual renderer processes (as opposed to mocks).
32 // 33 //
33 // Represents the browser side of the browser <--> renderer communication 34 // Represents the browser side of the browser <--> renderer communication
34 // channel. There will be one RenderProcessHost per renderer process. 35 // channel. There will be one RenderProcessHost per renderer process.
35 // 36 //
36 // This object is refcounted so that it can release its resources when all 37 // This object is refcounted so that it can release its resources when all
37 // hosts using it go away. 38 // hosts using it go away.
38 // 39 //
39 // This object communicates back and forth with the RenderProcess object 40 // This object communicates back and forth with the RenderProcess object
40 // running in the renderer process. Each RenderProcessHost and RenderProcess 41 // running in the renderer process. Each RenderProcessHost and RenderProcess
41 // keeps a list of RenderView (renderer) and WebContentsImpl (browser) which 42 // keeps a list of RenderView (renderer) and WebContentsImpl (browser) which
42 // are correlated with IDs. This way, the Views and the corresponding ViewHosts 43 // are correlated with IDs. This way, the Views and the corresponding ViewHosts
43 // communicate through the two process objects. 44 // communicate through the two process objects.
44 class CONTENT_EXPORT RenderProcessHostImpl 45 class CONTENT_EXPORT RenderProcessHostImpl
Charlie Reis 2012/08/14 18:50:12 Can you add something about the RenderProcessHost
awong 2012/08/14 19:12:47 Done.
45 : public RenderProcessHost, 46 : public RenderProcessHost,
46 public ChildProcessLauncher::Client { 47 public ChildProcessLauncher::Client {
47 public: 48 public:
48 RenderProcessHostImpl(BrowserContext* browser_context, bool is_guest); 49 RenderProcessHostImpl(BrowserContext* browser_context,
50 StoragePartitionImpl* storage_partition_impl,
Charlie Reis 2012/08/14 18:50:12 Why is this a StoragePartitionImpl rather than a S
awong 2012/08/14 19:12:47 We get covariant return which removes the need to
51 bool is_guest);
49 virtual ~RenderProcessHostImpl(); 52 virtual ~RenderProcessHostImpl();
50 53
51 // RenderProcessHost implementation (public portion). 54 // RenderProcessHost implementation (public portion).
52 virtual void EnableSendQueue() OVERRIDE; 55 virtual void EnableSendQueue() OVERRIDE;
53 virtual bool Init() OVERRIDE; 56 virtual bool Init() OVERRIDE;
54 virtual int GetNextRoutingID() OVERRIDE; 57 virtual int GetNextRoutingID() OVERRIDE;
55 virtual void CancelResourceRequests(int render_widget_id) OVERRIDE; 58 virtual void CancelResourceRequests(int render_widget_id) OVERRIDE;
56 virtual void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params) 59 virtual void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params)
57 OVERRIDE; 60 OVERRIDE;
58 virtual bool WaitForBackingStoreMsg(int render_widget_id, 61 virtual bool WaitForBackingStoreMsg(int render_widget_id,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // instead of in the channel so that we ensure they're sent after init related 255 // instead of in the channel so that we ensure they're sent after init related
253 // messages that are sent once the process handle is available. This is 256 // messages that are sent once the process handle is available. This is
254 // because the queued messages may have dependencies on the init messages. 257 // because the queued messages may have dependencies on the init messages.
255 std::queue<IPC::Message*> queued_messages_; 258 std::queue<IPC::Message*> queued_messages_;
256 259
257 // The globally-unique identifier for this RPH. 260 // The globally-unique identifier for this RPH.
258 int id_; 261 int id_;
259 262
260 BrowserContext* browser_context_; 263 BrowserContext* browser_context_;
261 264
265 // Owned by |browser_context_|.
266 StoragePartitionImpl* storage_partition_impl_;
267
262 // True if the process can be shut down suddenly. If this is true, then we're 268 // True if the process can be shut down suddenly. If this is true, then we're
263 // sure that all the RenderViews in the process can be shutdown suddenly. If 269 // sure that all the RenderViews in the process can be shutdown suddenly. If
264 // it's false, then specific RenderViews might still be allowed to be shutdown 270 // it's false, then specific RenderViews might still be allowed to be shutdown
265 // suddenly by checking their SuddenTerminationAllowed() flag. This can occur 271 // suddenly by checking their SuddenTerminationAllowed() flag. This can occur
266 // if one WebContents has an unload event listener but another WebContents in 272 // if one WebContents has an unload event listener but another WebContents in
267 // the same process doesn't. 273 // the same process doesn't.
268 bool sudden_termination_allowed_; 274 bool sudden_termination_allowed_;
269 275
270 // Set to true if we shouldn't send input events. We actually do the 276 // Set to true if we shouldn't send input events. We actually do the
271 // filtering for this at the render widget level. 277 // filtering for this at the render widget level.
272 bool ignore_input_events_; 278 bool ignore_input_events_;
273 279
274 // Records the last time we regarded the child process active. 280 // Records the last time we regarded the child process active.
275 base::TimeTicks child_process_activity_time_; 281 base::TimeTicks child_process_activity_time_;
276 282
277 // Indicates whether this is a RenderProcessHost of a Browser Plugin guest 283 // Indicates whether this is a RenderProcessHost of a Browser Plugin guest
278 // renderer. 284 // renderer.
279 bool is_guest_; 285 bool is_guest_;
280 286
281 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 287 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
282 }; 288 };
283 289
284 } // namespace content 290 } // namespace content
285 291
286 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 292 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698