| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // Similar to above, except |params.(x|y|width|height)| define the region | 168 // Similar to above, except |params.(x|y|width|height)| define the region |
| 169 // of the surface that changed. | 169 // of the surface that changed. |
| 170 virtual void AcceleratedSurfacePostSubBuffer( | 170 virtual void AcceleratedSurfacePostSubBuffer( |
| 171 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 171 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
| 172 int gpu_host_id) = 0; | 172 int gpu_host_id) = 0; |
| 173 | 173 |
| 174 // Release the accelerated surface temporarily. It will be recreated on the | 174 // Release the accelerated surface temporarily. It will be recreated on the |
| 175 // next swap buffers or post sub buffer. | 175 // next swap buffers or post sub buffer. |
| 176 virtual void AcceleratedSurfaceSuspend() = 0; | 176 virtual void AcceleratedSurfaceSuspend() = 0; |
| 177 | 177 |
| 178 // Return true if the view has an accelerated surface that contains the last |
| 179 // presented frame for the view. If |desired_size| is non-empty, true is |
| 180 // returned only if the accelerated surface size matches. |
| 181 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; |
| 182 |
| 178 #if defined(OS_MACOSX) | 183 #if defined(OS_MACOSX) |
| 179 // Retrieve the bounds of the view, in cocoa view coordinates. | 184 // Retrieve the bounds of the view, in cocoa view coordinates. |
| 180 // If the UI scale factor is 2, |GetViewBounds()| will return a size of e.g. | 185 // If the UI scale factor is 2, |GetViewBounds()| will return a size of e.g. |
| 181 // (400, 300) in pixels, while this method will return (200, 150). | 186 // (400, 300) in pixels, while this method will return (200, 150). |
| 182 // Even though this returns an gfx::Rect, the result is NOT IN PIXELS. | 187 // Even though this returns an gfx::Rect, the result is NOT IN PIXELS. |
| 183 virtual gfx::Rect GetViewCocoaBounds() const = 0; | 188 virtual gfx::Rect GetViewCocoaBounds() const = 0; |
| 184 | 189 |
| 185 // Informs the view that a plugin gained or lost focus. | 190 // Informs the view that a plugin gained or lost focus. |
| 186 virtual void PluginFocusChanged(bool focused, int plugin_id) = 0; | 191 virtual void PluginFocusChanged(bool focused, int plugin_id) = 0; |
| 187 | 192 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 virtual BrowserAccessibilityManager* | 264 virtual BrowserAccessibilityManager* |
| 260 GetBrowserAccessibilityManager() const = 0; | 265 GetBrowserAccessibilityManager() const = 0; |
| 261 virtual void OnAccessibilityNotifications( | 266 virtual void OnAccessibilityNotifications( |
| 262 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { | 267 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { |
| 263 } | 268 } |
| 264 }; | 269 }; |
| 265 | 270 |
| 266 } // namespace content | 271 } // namespace content |
| 267 | 272 |
| 268 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 273 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
| OLD | NEW |