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

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

Issue 7480028: Removal of Profile from content part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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) 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_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "base/id_map.h" 11 #include "base/id_map.h"
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/process_util.h" 14 #include "base/process_util.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "chrome/browser/profiles/profile.h"
17 #include "ipc/ipc_channel_proxy.h" 16 #include "ipc/ipc_channel_proxy.h"
18 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
19 #include "ui/gfx/surface/transport_dib.h" 18 #include "ui/gfx/surface/transport_dib.h"
20 19
21 struct ViewMsg_SwapOut_Params; 20 struct ViewMsg_SwapOut_Params;
22 21
23 namespace base { 22 namespace base {
24 class SharedMemory; 23 class SharedMemory;
25 } 24 }
26 25
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 int exit_code; 66 int exit_code;
68 bool was_extension_renderer; 67 bool was_extension_renderer;
69 }; 68 };
70 69
71 explicit RenderProcessHost(content::BrowserContext* browser_context); 70 explicit RenderProcessHost(content::BrowserContext* browser_context);
72 virtual ~RenderProcessHost(); 71 virtual ~RenderProcessHost();
73 72
74 // Returns the user browser context associated with this renderer process. 73 // Returns the user browser context associated with this renderer process.
75 content::BrowserContext* browser_context() const { return browser_context_; } 74 content::BrowserContext* browser_context() const { return browser_context_; }
76 75
77 // Returns the profile.
78 // TEMPORARY; http://crbug.com/76788
79 Profile* profile() const {
80 return Profile::FromBrowserContext(browser_context());
81 }
82
83 // Returns the unique ID for this child process. This can be used later in 76 // Returns the unique ID for this child process. This can be used later in
84 // a call to FromID() to get back to this object (this is used to avoid 77 // a call to FromID() to get back to this object (this is used to avoid
85 // sending non-threadsafe pointers to other threads). 78 // sending non-threadsafe pointers to other threads).
86 // 79 //
87 // This ID will be unique for all child processes, including workers, plugins, 80 // This ID will be unique for all child processes, including workers, plugins,
88 // etc. It is generated by ChildProcessInfo. 81 // etc. It is generated by ChildProcessInfo.
89 int id() const { return id_; } 82 int id() const { return id_; }
90 83
91 // Returns true iff channel_ has been set to non-NULL. Use this for checking 84 // Returns true iff channel_ has been set to non-NULL. Use this for checking
92 // if there is connection or not. 85 // if there is connection or not.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // Factory object for RenderProcessHosts. Using this factory allows tests to 338 // Factory object for RenderProcessHosts. Using this factory allows tests to
346 // swap out a different one to use a TestRenderProcessHost. 339 // swap out a different one to use a TestRenderProcessHost.
347 class RenderProcessHostFactory { 340 class RenderProcessHostFactory {
348 public: 341 public:
349 virtual ~RenderProcessHostFactory() {} 342 virtual ~RenderProcessHostFactory() {}
350 virtual RenderProcessHost* CreateRenderProcessHost( 343 virtual RenderProcessHost* CreateRenderProcessHost(
351 content::BrowserContext* browser_context) const = 0; 344 content::BrowserContext* browser_context) const = 0;
352 }; 345 };
353 346
354 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ 347 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698