| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 // Notifies the View that the renderer selection bounds has changed. | 134 // Notifies the View that the renderer selection bounds has changed. |
| 135 // |start_rect| and |end_rect| are the bounds end of the selection in the | 135 // |start_rect| and |end_rect| are the bounds end of the selection in the |
| 136 // coordinate system of the render view. | 136 // coordinate system of the render view. |
| 137 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, | 137 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, |
| 138 const gfx::Rect& end_rect) {} | 138 const gfx::Rect& end_rect) {} |
| 139 | 139 |
| 140 // Allocate a backing store for this view. | 140 // Allocate a backing store for this view. |
| 141 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; | 141 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; |
| 142 | 142 |
| 143 // DEPRECATED: Synchronous version of AsyncCopyFromCompositingSurface. | 143 // Copies the contents of the compositing surface into the given |
| 144 // This will be removed once all the caller have been chagned to use the | |
| 145 // asynchronous version. | |
| 146 virtual bool CopyFromCompositingSurface(const gfx::Size& size, | |
| 147 skia::PlatformCanvas* output) = 0; | |
| 148 | |
| 149 // Asynchrnously copies the contents of the compositing surface into the given | |
| 150 // (uninitialized) PlatformCanvas if any. | 144 // (uninitialized) PlatformCanvas if any. |
| 151 // |callback| is invoked with true on success, false otherwise. |output| can | 145 // |callback| is invoked with true on success, false otherwise. |output| can |
| 152 // be initialized even on failure. | 146 // be initialized even on failure. |
| 153 virtual void AsyncCopyFromCompositingSurface( | 147 // NOTE: |callback| is called asynchronously on Aura and synchronously on the |
| 148 // other platforms. |
| 149 virtual void CopyFromCompositingSurface( |
| 154 const gfx::Size& size, | 150 const gfx::Size& size, |
| 155 skia::PlatformCanvas* output, | 151 skia::PlatformCanvas* output, |
| 156 base::Callback<void(bool)> callback) = 0; | 152 base::Callback<void(bool)> callback) = 0; |
| 157 | 153 |
| 158 // Called when accelerated compositing state changes. | 154 // Called when accelerated compositing state changes. |
| 159 virtual void OnAcceleratedCompositingStateChange() = 0; | 155 virtual void OnAcceleratedCompositingStateChange() = 0; |
| 160 // |params.window| and |params.surface_id| indicate which accelerated | 156 // |params.window| and |params.surface_id| indicate which accelerated |
| 161 // surface's buffers swapped. |params.renderer_id| and |params.route_id| | 157 // surface's buffers swapped. |params.renderer_id| and |params.route_id| |
| 162 // are used to formulate a reply to the GPU process to prevent it from getting | 158 // are used to formulate a reply to the GPU process to prevent it from getting |
| 163 // too far ahead. They may all be zero, in which case no flow control is | 159 // too far ahead. They may all be zero, in which case no flow control is |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 virtual BrowserAccessibilityManager* | 260 virtual BrowserAccessibilityManager* |
| 265 GetBrowserAccessibilityManager() const = 0; | 261 GetBrowserAccessibilityManager() const = 0; |
| 266 virtual void OnAccessibilityNotifications( | 262 virtual void OnAccessibilityNotifications( |
| 267 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { | 263 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { |
| 268 } | 264 } |
| 269 }; | 265 }; |
| 270 | 266 |
| 271 } // namespace content | 267 } // namespace content |
| 272 | 268 |
| 273 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 269 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
| OLD | NEW |