| 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" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // Roundtrips through the renderer and compositor pipeline to ensure that any | 159 // Roundtrips through the renderer and compositor pipeline to ensure that any |
| 160 // changes to the contents resulting from operations executed prior to this | 160 // changes to the contents resulting from operations executed prior to this |
| 161 // call are visible on screen. The call completes asynchronously by running | 161 // call are visible on screen. The call completes asynchronously by running |
| 162 // the supplied |callback| with a value of true upon successful completion and | 162 // the supplied |callback| with a value of true upon successful completion and |
| 163 // false otherwise (when the frame is destroyed, detached, etc..). | 163 // false otherwise (when the frame is destroyed, detached, etc..). |
| 164 typedef base::Callback<void(bool)> VisualStateCallback; | 164 typedef base::Callback<void(bool)> VisualStateCallback; |
| 165 virtual void InsertVisualStateCallback( | 165 virtual void InsertVisualStateCallback( |
| 166 const VisualStateCallback& callback) = 0; | 166 const VisualStateCallback& callback) = 0; |
| 167 | 167 |
| 168 // Copies the image at the location in viewport coordinates (not frame |
| 169 // coordinates) to the clipboard. If there is no image at that location, does |
| 170 // nothing. |
| 171 virtual void CopyImageAt(int x, int y) = 0; |
| 172 |
| 173 // 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 |
| 175 // will post back the appropriate download message to trigger the save UI. |
| 176 // If there is no image at that location, does nothing. |
| 177 virtual void SaveImageAt(int x, int y) = 0; |
| 178 |
| 168 // RenderViewHost for this frame. | 179 // RenderViewHost for this frame. |
| 169 virtual RenderViewHost* GetRenderViewHost() = 0; | 180 virtual RenderViewHost* GetRenderViewHost() = 0; |
| 170 | 181 |
| 171 // Returns the ServiceRegistry for this frame. | 182 // Returns the ServiceRegistry for this frame. |
| 172 virtual ServiceRegistry* GetServiceRegistry() = 0; | 183 virtual ServiceRegistry* GetServiceRegistry() = 0; |
| 173 | 184 |
| 174 // Returns the visibility state of the frame. The different visibility states | 185 // Returns the visibility state of the frame. The different visibility states |
| 175 // of a frame are defined in Blink. | 186 // of a frame are defined in Blink. |
| 176 virtual blink::WebPageVisibilityState GetVisibilityState() = 0; | 187 virtual blink::WebPageVisibilityState GetVisibilityState() = 0; |
| 177 | 188 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 192 | 203 |
| 193 private: | 204 private: |
| 194 // This interface should only be implemented inside content. | 205 // This interface should only be implemented inside content. |
| 195 friend class RenderFrameHostImpl; | 206 friend class RenderFrameHostImpl; |
| 196 RenderFrameHost() {} | 207 RenderFrameHost() {} |
| 197 }; | 208 }; |
| 198 | 209 |
| 199 } // namespace content | 210 } // namespace content |
| 200 | 211 |
| 201 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 212 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
| OLD | NEW |