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_RENDERER_RENDER_FRAME_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "ipc/ipc_listener.h" | 9 #include "ipc/ipc_listener.h" |
10 #include "ipc/ipc_sender.h" | 10 #include "ipc/ipc_sender.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class RenderView; | 24 class RenderView; |
25 struct ContextMenuParams; | 25 struct ContextMenuParams; |
26 struct WebPluginInfo; | 26 struct WebPluginInfo; |
27 | 27 |
28 // This interface wraps functionality, which is specific to frames, such as | 28 // This interface wraps functionality, which is specific to frames, such as |
29 // navigation. It provides communication with a corresponding RenderFrameHost | 29 // navigation. It provides communication with a corresponding RenderFrameHost |
30 // in the browser process. | 30 // in the browser process. |
31 class CONTENT_EXPORT RenderFrame : public IPC::Listener, | 31 class CONTENT_EXPORT RenderFrame : public IPC::Listener, |
32 public IPC::Sender { | 32 public IPC::Sender { |
33 public: | 33 public: |
| 34 // Returns the RenderFrame given a WebFrame. |
| 35 static RenderFrame* FromWebFrame(blink::WebFrame* web_frame); |
| 36 |
34 // Returns the RenderView associated with this frame. | 37 // Returns the RenderView associated with this frame. |
35 virtual RenderView* GetRenderView() = 0; | 38 virtual RenderView* GetRenderView() = 0; |
36 | 39 |
37 // Get the routing ID of the frame. | 40 // Get the routing ID of the frame. |
38 virtual int GetRoutingID() = 0; | 41 virtual int GetRoutingID() = 0; |
39 | 42 |
| 43 // Returns the associated WebFrame. |
| 44 virtual blink::WebFrame* GetWebFrame() = 0; |
| 45 |
40 // Gets WebKit related preferences associated with this frame. | 46 // Gets WebKit related preferences associated with this frame. |
41 virtual WebPreferences& GetWebkitPreferences() = 0; | 47 virtual WebPreferences& GetWebkitPreferences() = 0; |
42 | 48 |
43 // Shows a context menu with the given information. The given client will | 49 // Shows a context menu with the given information. The given client will |
44 // be called with the result. | 50 // be called with the result. |
45 // | 51 // |
46 // The request ID will be returned by this function. This is passed to the | 52 // The request ID will be returned by this function. This is passed to the |
47 // client functions for identification. | 53 // client functions for identification. |
48 // | 54 // |
49 // If the client is destroyed, CancelContextMenu() should be called with the | 55 // If the client is destroyed, CancelContextMenu() should be called with the |
(...skipping 26 matching lines...) Expand all Loading... |
76 | 82 |
77 private: | 83 private: |
78 // This interface should only be implemented inside content. | 84 // This interface should only be implemented inside content. |
79 friend class RenderFrameImpl; | 85 friend class RenderFrameImpl; |
80 RenderFrame() {} | 86 RenderFrame() {} |
81 }; | 87 }; |
82 | 88 |
83 } // namespace content | 89 } // namespace content |
84 | 90 |
85 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 91 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
OLD | NEW |