| 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 RenderProcessHost; | 27 class RenderProcessHost; |
| 28 class RenderViewHost; | 28 class RenderViewHost; |
| 29 class RenderWidgetHostView; |
| 29 class ServiceRegistry; | 30 class ServiceRegistry; |
| 30 class SiteInstance; | 31 class SiteInstance; |
| 31 | 32 |
| 32 // 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. |
| 33 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, | 34 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, |
| 34 public IPC::Sender { | 35 public IPC::Sender { |
| 35 public: | 36 public: |
| 36 // 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. |
| 37 // 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. |
| 38 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); | 39 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 66 virtual int GetAXTreeID() = 0; | 67 virtual int GetAXTreeID() = 0; |
| 67 | 68 |
| 68 // Returns the SiteInstance grouping all RenderFrameHosts that have script | 69 // Returns the SiteInstance grouping all RenderFrameHosts that have script |
| 69 // access to this RenderFrameHost, and must therefore live in the same | 70 // access to this RenderFrameHost, and must therefore live in the same |
| 70 // process. | 71 // process. |
| 71 virtual SiteInstance* GetSiteInstance() = 0; | 72 virtual SiteInstance* GetSiteInstance() = 0; |
| 72 | 73 |
| 73 // Returns the process for this frame. | 74 // Returns the process for this frame. |
| 74 virtual RenderProcessHost* GetProcess() = 0; | 75 virtual RenderProcessHost* GetProcess() = 0; |
| 75 | 76 |
| 77 // Returns the RenderWidgetHostView that can be used to control focus and |
| 78 // visibility for this frame. |
| 79 virtual RenderWidgetHostView* GetView() = 0; |
| 80 |
| 76 // Returns the current RenderFrameHost of the parent frame, or nullptr if | 81 // Returns the current RenderFrameHost of the parent frame, or nullptr if |
| 77 // there is no parent. The result may be in a different process than the | 82 // there is no parent. The result may be in a different process than the |
| 78 // current RenderFrameHost. | 83 // current RenderFrameHost. |
| 79 virtual RenderFrameHost* GetParent() = 0; | 84 virtual RenderFrameHost* GetParent() = 0; |
| 80 | 85 |
| 81 // Returns the FrameTreeNode ID for this frame. This ID is browser-global and | 86 // Returns the FrameTreeNode ID for this frame. This ID is browser-global and |
| 82 // uniquely identifies a frame that hosts content. The identifier is fixed at | 87 // uniquely identifies a frame that hosts content. The identifier is fixed at |
| 83 // the creation of the frame and stays constant for the lifetime of the frame. | 88 // the creation of the frame and stays constant for the lifetime of the frame. |
| 84 // When the frame is removed, the ID is not used again. | 89 // When the frame is removed, the ID is not used again. |
| 85 // | 90 // |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 204 |
| 200 private: | 205 private: |
| 201 // This interface should only be implemented inside content. | 206 // This interface should only be implemented inside content. |
| 202 friend class RenderFrameHostImpl; | 207 friend class RenderFrameHostImpl; |
| 203 RenderFrameHost() {} | 208 RenderFrameHost() {} |
| 204 }; | 209 }; |
| 205 | 210 |
| 206 } // namespace content | 211 } // namespace content |
| 207 | 212 |
| 208 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 213 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
| OLD | NEW |