OLD | NEW |
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 "ipc/ipc_listener.h" | 14 #include "ipc/ipc_listener.h" |
15 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
16 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 16 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
17 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 #include "url/origin.h" | 20 #include "url/origin.h" |
21 | 21 |
22 namespace base { | 22 namespace base { |
23 class Value; | 23 class Value; |
24 } | 24 } |
25 | 25 |
26 namespace content { | 26 namespace content { |
| 27 class BrowserServiceRegistry; |
27 class RenderProcessHost; | 28 class RenderProcessHost; |
28 class RenderViewHost; | 29 class RenderViewHost; |
29 class RenderWidgetHostView; | 30 class RenderWidgetHostView; |
30 class ServiceRegistry; | |
31 class SiteInstance; | 31 class SiteInstance; |
32 | 32 |
33 // The interface provides a communication conduit with a frame in the renderer. | 33 // The interface provides a communication conduit with a frame in the renderer. |
34 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, | 34 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, |
35 public IPC::Sender { | 35 public IPC::Sender { |
36 public: | 36 public: |
37 // Returns the RenderFrameHost given its ID and the ID of its render process. | 37 // Returns the RenderFrameHost given its ID and the ID of its render process. |
38 // Returns nullptr if the IDs do not correspond to a live RenderFrameHost. | 38 // Returns nullptr if the IDs do not correspond to a live RenderFrameHost. |
39 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); | 39 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); |
40 | 40 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // the supplied |callback| with a value of true upon successful completion and | 170 // the supplied |callback| with a value of true upon successful completion and |
171 // false otherwise (when the frame is destroyed, detached, etc..). | 171 // false otherwise (when the frame is destroyed, detached, etc..). |
172 typedef base::Callback<void(bool)> VisualStateCallback; | 172 typedef base::Callback<void(bool)> VisualStateCallback; |
173 virtual void InsertVisualStateCallback( | 173 virtual void InsertVisualStateCallback( |
174 const VisualStateCallback& callback) = 0; | 174 const VisualStateCallback& callback) = 0; |
175 | 175 |
176 // Temporary until we get rid of RenderViewHost. | 176 // Temporary until we get rid of RenderViewHost. |
177 virtual RenderViewHost* GetRenderViewHost() = 0; | 177 virtual RenderViewHost* GetRenderViewHost() = 0; |
178 | 178 |
179 // Returns the ServiceRegistry for this frame. | 179 // Returns the ServiceRegistry for this frame. |
180 virtual ServiceRegistry* GetServiceRegistry() = 0; | 180 virtual BrowserServiceRegistry* GetServiceRegistry() = 0; |
181 | 181 |
182 // Returns the visibility state of the frame. The different visibility states | 182 // Returns the visibility state of the frame. The different visibility states |
183 // of a frame are defined in Blink. | 183 // of a frame are defined in Blink. |
184 virtual blink::WebPageVisibilityState GetVisibilityState() = 0; | 184 virtual blink::WebPageVisibilityState GetVisibilityState() = 0; |
185 | 185 |
186 // Returns whether the RenderFrame in the renderer process has been created | 186 // Returns whether the RenderFrame in the renderer process has been created |
187 // and still has a connection. This is valid for all frames. | 187 // and still has a connection. This is valid for all frames. |
188 virtual bool IsRenderFrameLive() = 0; | 188 virtual bool IsRenderFrameLive() = 0; |
189 | 189 |
190 // Get the number of proxies to this frame, in all processes. Exposed for | 190 // Get the number of proxies to this frame, in all processes. Exposed for |
(...skipping 11 matching lines...) Expand all Loading... |
202 | 202 |
203 private: | 203 private: |
204 // This interface should only be implemented inside content. | 204 // This interface should only be implemented inside content. |
205 friend class RenderFrameHostImpl; | 205 friend class RenderFrameHostImpl; |
206 RenderFrameHost() {} | 206 RenderFrameHost() {} |
207 }; | 207 }; |
208 | 208 |
209 } // namespace content | 209 } // namespace content |
210 | 210 |
211 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 211 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
OLD | NEW |