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

Side by Side Diff: content/public/browser/render_frame_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: address comments Created 6 years, 5 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
« no previous file with comments | « content/ppapi_plugin/BUILD.gn ('k') | content/public/browser/render_process_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "ipc/ipc_listener.h" 12 #include "ipc/ipc_listener.h"
13 #include "ipc/ipc_sender.h" 13 #include "ipc/ipc_sender.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace base { 17 namespace base {
18 class Value; 18 class Value;
19 } 19 }
20 20
21 namespace content { 21 namespace content {
22 class RenderProcessHost; 22 class RenderProcessHost;
23 class RenderViewHost; 23 class RenderViewHost;
24 class ServiceRegistry;
24 class SiteInstance; 25 class SiteInstance;
25 26
26 // The interface provides a communication conduit with a frame in the renderer. 27 // The interface provides a communication conduit with a frame in the renderer.
27 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, 28 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener,
28 public IPC::Sender { 29 public IPC::Sender {
29 public: 30 public:
30 // Returns the RenderFrameHost given its ID and the ID of its render process. 31 // Returns the RenderFrameHost given its ID and the ID of its render process.
31 // Returns NULL if the IDs do not correspond to a live RenderFrameHost. 32 // Returns NULL if the IDs do not correspond to a live RenderFrameHost.
32 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); 33 static RenderFrameHost* FromID(int render_process_id, int render_frame_id);
33 34
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Runs some JavaScript in this frame's context. If a callback is provided, it 68 // Runs some JavaScript in this frame's context. If a callback is provided, it
68 // will be used to return the result, when the result is available. 69 // will be used to return the result, when the result is available.
69 typedef base::Callback<void(const base::Value*)> JavaScriptResultCallback; 70 typedef base::Callback<void(const base::Value*)> JavaScriptResultCallback;
70 virtual void ExecuteJavaScript(const base::string16& javascript) = 0; 71 virtual void ExecuteJavaScript(const base::string16& javascript) = 0;
71 virtual void ExecuteJavaScript(const base::string16& javascript, 72 virtual void ExecuteJavaScript(const base::string16& javascript,
72 const JavaScriptResultCallback& callback) = 0; 73 const JavaScriptResultCallback& callback) = 0;
73 74
74 // Temporary until we get rid of RenderViewHost. 75 // Temporary until we get rid of RenderViewHost.
75 virtual RenderViewHost* GetRenderViewHost() = 0; 76 virtual RenderViewHost* GetRenderViewHost() = 0;
76 77
78 // Returns the ServiceRegistry for this frame.
79 virtual ServiceRegistry* GetServiceRegistry() = 0;
80
77 private: 81 private:
78 // This interface should only be implemented inside content. 82 // This interface should only be implemented inside content.
79 friend class RenderFrameHostImpl; 83 friend class RenderFrameHostImpl;
80 RenderFrameHost() {} 84 RenderFrameHost() {}
81 }; 85 };
82 86
83 } // namespace content 87 } // namespace content
84 88
85 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 89 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « content/ppapi_plugin/BUILD.gn ('k') | content/public/browser/render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698