OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 5 #ifndef CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // |start_rect| and |end_rect| are the bounds end of the selection in the | 137 // |start_rect| and |end_rect| are the bounds end of the selection in the |
138 // coordinate system of the render view. | 138 // coordinate system of the render view. |
139 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, | 139 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, |
140 const gfx::Rect& end_rect) {} | 140 const gfx::Rect& end_rect) {} |
141 | 141 |
142 // Allocate a backing store for this view. | 142 // Allocate a backing store for this view. |
143 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; | 143 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; |
144 | 144 |
145 // Copies the contents of the compositing surface into the given | 145 // Copies the contents of the compositing surface into the given |
146 // (uninitialized) PlatformCanvas if any. | 146 // (uninitialized) PlatformCanvas if any. |
| 147 // The rectangle region specified with |src_subrect| is copied from the |
| 148 // contents, scaled to |dst_size|, and written to |output|. |
147 // |callback| is invoked with true on success, false otherwise. |output| can | 149 // |callback| is invoked with true on success, false otherwise. |output| can |
148 // be initialized even on failure. | 150 // be initialized even on failure. |
149 // NOTE: |callback| is called asynchronously on Aura and synchronously on the | 151 // NOTE: |callback| is called asynchronously on Aura and synchronously on the |
150 // other platforms. | 152 // other platforms. |
151 virtual void CopyFromCompositingSurface( | 153 virtual void CopyFromCompositingSurface( |
152 const gfx::Size& size, | 154 const gfx::Rect& src_subrect, |
| 155 const gfx::Size& dst_size, |
153 const base::Callback<void(bool)>& callback, | 156 const base::Callback<void(bool)>& callback, |
154 skia::PlatformCanvas* output) = 0; | 157 skia::PlatformCanvas* output) = 0; |
155 | 158 |
156 // Called when accelerated compositing state changes. | 159 // Called when accelerated compositing state changes. |
157 virtual void OnAcceleratedCompositingStateChange() = 0; | 160 virtual void OnAcceleratedCompositingStateChange() = 0; |
158 // |params.window| and |params.surface_id| indicate which accelerated | 161 // |params.window| and |params.surface_id| indicate which accelerated |
159 // surface's buffers swapped. |params.renderer_id| and |params.route_id| | 162 // surface's buffers swapped. |params.renderer_id| and |params.route_id| |
160 // are used to formulate a reply to the GPU process to prevent it from getting | 163 // are used to formulate a reply to the GPU process to prevent it from getting |
161 // too far ahead. They may all be zero, in which case no flow control is | 164 // too far ahead. They may all be zero, in which case no flow control is |
162 // enforced; this case is currently used for accelerated plugins. | 165 // enforced; this case is currently used for accelerated plugins. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 virtual BrowserAccessibilityManager* | 264 virtual BrowserAccessibilityManager* |
262 GetBrowserAccessibilityManager() const = 0; | 265 GetBrowserAccessibilityManager() const = 0; |
263 virtual void OnAccessibilityNotifications( | 266 virtual void OnAccessibilityNotifications( |
264 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { | 267 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { |
265 } | 268 } |
266 }; | 269 }; |
267 | 270 |
268 } // namespace content | 271 } // namespace content |
269 | 272 |
270 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 273 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
OLD | NEW |