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

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

Issue 2079943002: Change RenderFrame to use InterfaceRegistry et al. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2
Patch Set: . Created 4 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
« no previous file with comments | « content/public/browser/gpu_service_registry.h ('k') | content/public/gpu/content_gpu_client.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 "build/build_config.h" 11 #include "build/build_config.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/common/console_message_level.h" 13 #include "content/public/common/console_message_level.h"
14 #include "content/public/common/file_chooser_params.h" 14 #include "content/public/common/file_chooser_params.h"
15 #include "ipc/ipc_listener.h" 15 #include "ipc/ipc_listener.h"
16 #include "ipc/ipc_sender.h" 16 #include "ipc/ipc_sender.h"
17 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 17 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
18 #include "ui/gfx/geometry/rect.h" 18 #include "ui/gfx/geometry/rect.h"
19 #include "ui/gfx/native_widget_types.h" 19 #include "ui/gfx/native_widget_types.h"
20 #include "url/gurl.h" 20 #include "url/gurl.h"
21 #include "url/origin.h" 21 #include "url/origin.h"
22 22
23 namespace base { 23 namespace base {
24 class Value; 24 class Value;
25 } 25 }
26 26
27 namespace shell {
28 class InterfaceRegistry;
29 class InterfaceProvider;
30 }
31
27 namespace content { 32 namespace content {
28 class RenderProcessHost; 33 class RenderProcessHost;
29 class RenderViewHost; 34 class RenderViewHost;
30 class RenderWidgetHostView; 35 class RenderWidgetHostView;
31 class ServiceRegistry;
32 class SiteInstance; 36 class SiteInstance;
33 struct FileChooserFileInfo; 37 struct FileChooserFileInfo;
34 38
35 // The interface provides a communication conduit with a frame in the renderer. 39 // The interface provides a communication conduit with a frame in the renderer.
36 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, 40 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener,
37 public IPC::Sender { 41 public IPC::Sender {
38 public: 42 public:
39 // Returns the RenderFrameHost given its ID and the ID of its render process. 43 // Returns the RenderFrameHost given its ID and the ID of its render process.
40 // Returns nullptr if the IDs do not correspond to a live RenderFrameHost. 44 // Returns nullptr if the IDs do not correspond to a live RenderFrameHost.
41 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); 45 static RenderFrameHost* FromID(int render_process_id, int render_frame_id);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 176
173 // Requests to save the image at the location in viewport coordinates (not 177 // Requests to save the image at the location in viewport coordinates (not
174 // frame coordinates). If there is an image at the location, the renderer 178 // frame coordinates). If there is an image at the location, the renderer
175 // will post back the appropriate download message to trigger the save UI. 179 // will post back the appropriate download message to trigger the save UI.
176 // If there is no image at that location, does nothing. 180 // If there is no image at that location, does nothing.
177 virtual void SaveImageAt(int x, int y) = 0; 181 virtual void SaveImageAt(int x, int y) = 0;
178 182
179 // RenderViewHost for this frame. 183 // RenderViewHost for this frame.
180 virtual RenderViewHost* GetRenderViewHost() = 0; 184 virtual RenderViewHost* GetRenderViewHost() = 0;
181 185
182 // Returns the ServiceRegistry for this frame. 186 // Returns the InterfaceRegistry that this process uses to expose interfaces
183 virtual ServiceRegistry* GetServiceRegistry() = 0; 187 // to the application running in this frame.
188 virtual shell::InterfaceRegistry* GetInterfaceRegistry() = 0;
189
190 // Returns the InterfaceProvider that this process can use to bind
191 // interfaces exposed to it by the application running in this frame.
192 virtual shell::InterfaceProvider* GetRemoteInterfaces() = 0;
184 193
185 // Returns the visibility state of the frame. The different visibility states 194 // Returns the visibility state of the frame. The different visibility states
186 // of a frame are defined in Blink. 195 // of a frame are defined in Blink.
187 virtual blink::WebPageVisibilityState GetVisibilityState() = 0; 196 virtual blink::WebPageVisibilityState GetVisibilityState() = 0;
188 197
189 // Returns whether the RenderFrame in the renderer process has been created 198 // Returns whether the RenderFrame in the renderer process has been created
190 // and still has a connection. This is valid for all frames. 199 // and still has a connection. This is valid for all frames.
191 virtual bool IsRenderFrameLive() = 0; 200 virtual bool IsRenderFrameLive() = 0;
192 201
193 // Get the number of proxies to this frame, in all processes. Exposed for 202 // Get the number of proxies to this frame, in all processes. Exposed for
194 // use by resource metrics. 203 // use by resource metrics.
195 virtual int GetProxyCount() = 0; 204 virtual int GetProxyCount() = 0;
196 205
197 // Notifies the Listener that one or more files have been chosen by the user 206 // Notifies the Listener that one or more files have been chosen by the user
198 // from a file chooser dialog for the form. |permissions| is the file 207 // from a file chooser dialog for the form. |permissions| is the file
199 // selection mode in which the chooser dialog was created. 208 // selection mode in which the chooser dialog was created.
200 virtual void FilesSelectedInChooser( 209 virtual void FilesSelectedInChooser(
201 const std::vector<content::FileChooserFileInfo>& files, 210 const std::vector<content::FileChooserFileInfo>& files,
202 FileChooserParams::Mode permissions) = 0; 211 FileChooserParams::Mode permissions) = 0;
203 212
204 private: 213 private:
205 // This interface should only be implemented inside content. 214 // This interface should only be implemented inside content.
206 friend class RenderFrameHostImpl; 215 friend class RenderFrameHostImpl;
207 RenderFrameHost() {} 216 RenderFrameHost() {}
208 }; 217 };
209 218
210 } // namespace content 219 } // namespace content
211 220
212 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 221 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « content/public/browser/gpu_service_registry.h ('k') | content/public/gpu/content_gpu_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698