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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // Return the RenderAccessibility associated with this frame. | 108 // Return the RenderAccessibility associated with this frame. |
109 virtual RenderAccessibility* GetRenderAccessibility() = 0; | 109 virtual RenderAccessibility* GetRenderAccessibility() = 0; |
110 | 110 |
111 // Get the routing ID of the frame. | 111 // Get the routing ID of the frame. |
112 virtual int GetRoutingID() = 0; | 112 virtual int GetRoutingID() = 0; |
113 | 113 |
114 // Returns the associated WebFrame. | 114 // Returns the associated WebFrame. |
115 virtual blink::WebLocalFrame* GetWebFrame() = 0; | 115 virtual blink::WebLocalFrame* GetWebFrame() = 0; |
116 | 116 |
117 // Gets WebKit related preferences associated with this frame. | 117 // Gets WebKit related preferences associated with this frame. |
118 virtual WebPreferences& GetWebkitPreferences() = 0; | 118 virtual const WebPreferences& GetWebkitPreferences() = 0; |
119 | 119 |
120 // Shows a context menu with the given information. The given client will | 120 // Shows a context menu with the given information. The given client will |
121 // be called with the result. | 121 // be called with the result. |
122 // | 122 // |
123 // The request ID will be returned by this function. This is passed to the | 123 // The request ID will be returned by this function. This is passed to the |
124 // client functions for identification. | 124 // client functions for identification. |
125 // | 125 // |
126 // If the client is destroyed, CancelContextMenu() should be called with the | 126 // If the client is destroyed, CancelContextMenu() should be called with the |
127 // request ID returned by this function. | 127 // request ID returned by this function. |
128 // | 128 // |
129 // Note: if you end up having clients outliving the RenderFrame, we should add | 129 // Note: if you end up having clients outliving the RenderFrame, we should add |
130 // a CancelContextMenuCallback function that takes a request id. | 130 // a CancelContextMenuCallback function that takes a request id. |
131 virtual int ShowContextMenu(ContextMenuClient* client, | 131 virtual int ShowContextMenu(ContextMenuClient* client, |
132 const ContextMenuParams& params) = 0; | 132 const ContextMenuParams& params) = 0; |
133 | 133 |
134 // Cancels a context menu in the event that the client is destroyed before the | 134 // Cancels a context menu in the event that the client is destroyed before the |
135 // menu is closed. | 135 // menu is closed. |
136 virtual void CancelContextMenu(int request_id) = 0; | 136 virtual void CancelContextMenu(int request_id) = 0; |
137 | 137 |
138 // Create a new NPAPI/Pepper plugin depending on |info|. Returns NULL if no | 138 // Create a new Pepper plugin depending on |info|. Returns NULL if no plugin |
139 // plugin was found. |throttler| may be empty. | 139 // was found. |throttler| may be empty. |
140 virtual blink::WebPlugin* CreatePlugin( | 140 virtual blink::WebPlugin* CreatePlugin( |
141 blink::WebFrame* frame, | 141 blink::WebFrame* frame, |
142 const WebPluginInfo& info, | 142 const WebPluginInfo& info, |
143 const blink::WebPluginParams& params, | 143 const blink::WebPluginParams& params, |
144 std::unique_ptr<PluginInstanceThrottler> throttler) = 0; | 144 std::unique_ptr<PluginInstanceThrottler> throttler) = 0; |
145 | 145 |
146 // The client should handle the navigation externally. | 146 // The client should handle the navigation externally. |
147 virtual void LoadURLExternally(const blink::WebURLRequest& request, | 147 virtual void LoadURLExternally(const blink::WebURLRequest& request, |
148 blink::WebNavigationPolicy policy) = 0; | 148 blink::WebNavigationPolicy policy) = 0; |
149 | 149 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 267 |
268 private: | 268 private: |
269 // This interface should only be implemented inside content. | 269 // This interface should only be implemented inside content. |
270 friend class RenderFrameImpl; | 270 friend class RenderFrameImpl; |
271 RenderFrame() {} | 271 RenderFrame() {} |
272 }; | 272 }; |
273 | 273 |
274 } // namespace content | 274 } // namespace content |
275 | 275 |
276 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 276 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
OLD | NEW |