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

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

Issue 285333003: Support exposing Mojo services between render frames, render threads, and their respective hosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle the case where handles arrive before the RenderFrame is ready Created 6 years, 6 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
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_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/id_map.h" 9 #include "base/id_map.h"
10 #include "base/process/kill.h" 10 #include "base/process/kill.h"
11 #include "base/process/process_handle.h" 11 #include "base/process/process_handle.h"
12 #include "base/supports_user_data.h" 12 #include "base/supports_user_data.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "ipc/ipc_channel_proxy.h" 14 #include "ipc/ipc_channel_proxy.h"
15 #include "ipc/ipc_sender.h" 15 #include "ipc/ipc_sender.h"
16 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 17
18 class GURL; 18 class GURL;
19 struct ViewMsg_SwapOut_Params; 19 struct ViewMsg_SwapOut_Params;
20 20
21 namespace base { 21 namespace base {
22 class TimeDelta; 22 class TimeDelta;
23 } 23 }
24 24
25 namespace content { 25 namespace content {
26 class BrowserContext; 26 class BrowserContext;
27 class BrowserMessageFilter; 27 class BrowserMessageFilter;
28 class RenderProcessHostObserver; 28 class RenderProcessHostObserver;
29 class RenderWidgetHost; 29 class RenderWidgetHost;
30 class ServiceRegistry;
30 class StoragePartition; 31 class StoragePartition;
31 struct GlobalRequestID; 32 struct GlobalRequestID;
32 33
33 // Interface that represents the browser side of the browser <-> renderer 34 // Interface that represents the browser side of the browser <-> renderer
34 // communication channel. There will generally be one RenderProcessHost per 35 // communication channel. There will generally be one RenderProcessHost per
35 // renderer process. 36 // renderer process.
36 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, 37 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
37 public IPC::Listener, 38 public IPC::Listener,
38 public base::SupportsUserData { 39 public base::SupportsUserData {
39 public: 40 public:
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 #endif 226 #endif
226 227
227 // Tells the ResourceDispatcherHost to resume a deferred navigation without 228 // Tells the ResourceDispatcherHost to resume a deferred navigation without
228 // transferring it to a new renderer process. 229 // transferring it to a new renderer process.
229 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0; 230 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0;
230 231
231 // Notifies the renderer that the timezone configuration of the system might 232 // Notifies the renderer that the timezone configuration of the system might
232 // have changed. 233 // have changed.
233 virtual void NotifyTimezoneChange() = 0; 234 virtual void NotifyTimezoneChange() = 0;
234 235
236 // Returns the ServiceRegistry for this process.
237 virtual ServiceRegistry* GetServiceRegistry() = 0;
238
239 // Activates mojo for this process.
240 virtual void ActivateMojo() = 0;
darin (slow to review) 2014/06/18 00:09:28 It'd be nice to make ActivateMojo() a private impl
Sam McNally 2014/06/18 01:31:40 Done.
241
235 // Static management functions ----------------------------------------------- 242 // Static management functions -----------------------------------------------
236 243
237 // Flag to run the renderer in process. This is primarily 244 // Flag to run the renderer in process. This is primarily
238 // for debugging purposes. When running "in process", the 245 // for debugging purposes. When running "in process", the
239 // browser maintains a single RenderProcessHost which communicates 246 // browser maintains a single RenderProcessHost which communicates
240 // to a RenderProcess which is instantiated in the same process 247 // to a RenderProcess which is instantiated in the same process
241 // with the Browser. All IPC between the Browser and the 248 // with the Browser. All IPC between the Browser and the
242 // Renderer is the same, it's just not crossing a process boundary. 249 // Renderer is the same, it's just not crossing a process boundary.
243 250
244 static bool run_renderer_in_process(); 251 static bool run_renderer_in_process();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 static void SetMaxRendererProcessCount(size_t count); 290 static void SetMaxRendererProcessCount(size_t count);
284 291
285 // Returns the current max number of renderer processes used by the content 292 // Returns the current max number of renderer processes used by the content
286 // module. 293 // module.
287 static size_t GetMaxRendererProcessCount(); 294 static size_t GetMaxRendererProcessCount();
288 }; 295 };
289 296
290 } // namespace content. 297 } // namespace content.
291 298
292 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 299 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698