| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 #import <QuartzCore/CALayer.h> | 10 #import <QuartzCore/CALayer.h> |
| 11 | 11 |
| 12 #include "base/scoped_nsobject.h" | 12 #include "base/scoped_nsobject.h" |
| 13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 14 #include "base/task.h" | 14 #include "base/task.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 #include "chrome/browser/cocoa/base_view.h" | 16 #include "chrome/browser/cocoa/base_view.h" |
| 17 #include "chrome/browser/cocoa/browser_accessibility.h" | 17 #include "chrome/browser/cocoa/browser_accessibility.h" |
| 18 #include "chrome/browser/cocoa/browser_accessibility_delegate.h" | 18 #include "chrome/browser/cocoa/browser_accessibility_delegate.h" |
| 19 #include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac
.h" | 19 #include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac
.h" |
| 20 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 20 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 21 #include "chrome/common/edit_command.h" | 21 #include "chrome/common/edit_command.h" |
| 22 #include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h" | 22 #include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h" |
| 23 #include "webkit/glue/webcursor.h" | 23 #include "webkit/glue/webcursor.h" |
| 24 #include "webkit/glue/webmenuitem.h" | 24 #include "webkit/glue/webmenuitem.h" |
| 25 | 25 |
| 26 @class AcceleratedPluginView; |
| 26 class RenderWidgetHostViewMac; | 27 class RenderWidgetHostViewMac; |
| 27 class RWHVMEditCommandHelper; | 28 class RWHVMEditCommandHelper; |
| 28 @class ToolTip; | 29 @class ToolTip; |
| 29 | 30 |
| 30 @protocol RenderWidgetHostViewMacOwner | 31 @protocol RenderWidgetHostViewMacOwner |
| 31 - (RenderWidgetHostViewMac*)renderWidgetHostViewMac; | 32 - (RenderWidgetHostViewMac*)renderWidgetHostViewMac; |
| 32 @end | 33 @end |
| 33 | 34 |
| 34 // This is the view that lives in the Cocoa view hierarchy. In Windows-land, | 35 // This is the view that lives in the Cocoa view hierarchy. In Windows-land, |
| 35 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles | 36 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 int32 height, | 231 int32 height, |
| 231 uint64 io_surface_identifier); | 232 uint64 io_surface_identifier); |
| 232 virtual void AcceleratedSurfaceSetTransportDIB( | 233 virtual void AcceleratedSurfaceSetTransportDIB( |
| 233 gfx::PluginWindowHandle window, | 234 gfx::PluginWindowHandle window, |
| 234 int32 width, | 235 int32 width, |
| 235 int32 height, | 236 int32 height, |
| 236 TransportDIB::Handle transport_dib); | 237 TransportDIB::Handle transport_dib); |
| 237 virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window); | 238 virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window); |
| 238 virtual void GpuRenderingStateDidChange(); | 239 virtual void GpuRenderingStateDidChange(); |
| 239 void DrawAcceleratedSurfaceInstance( | 240 void DrawAcceleratedSurfaceInstance( |
| 240 CGLContextObj context, gfx::PluginWindowHandle plugin_handle); | 241 CGLContextObj context, |
| 242 gfx::PluginWindowHandle plugin_handle, |
| 243 NSSize size); |
| 241 // Forces the textures associated with any accelerated plugin instances | 244 // Forces the textures associated with any accelerated plugin instances |
| 242 // to be reloaded. | 245 // to be reloaded. |
| 243 void ForceTextureReload(); | 246 void ForceTextureReload(); |
| 244 | 247 |
| 245 virtual void SetVisuallyDeemphasized(bool deemphasized); | 248 virtual void SetVisuallyDeemphasized(bool deemphasized); |
| 246 | 249 |
| 247 void KillSelf(); | 250 void KillSelf(); |
| 248 | 251 |
| 249 void set_parent_view(NSView* parent_view) { parent_view_ = parent_view; } | 252 void set_parent_view(NSView* parent_view) { parent_view_ = parent_view; } |
| 250 | 253 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 277 // not having anything to paint (empty backing store from renderer). This | 280 // not having anything to paint (empty backing store from renderer). This |
| 278 // value returns true for is_null() if we are not recording whiteout times. | 281 // value returns true for is_null() if we are not recording whiteout times. |
| 279 base::TimeTicks whiteout_start_time_; | 282 base::TimeTicks whiteout_start_time_; |
| 280 | 283 |
| 281 // The time it took after this view was selected for it to be fully painted. | 284 // The time it took after this view was selected for it to be fully painted. |
| 282 base::TimeTicks tab_switch_paint_time_; | 285 base::TimeTicks tab_switch_paint_time_; |
| 283 | 286 |
| 284 // Current text input type. | 287 // Current text input type. |
| 285 WebKit::WebTextInputType text_input_type_; | 288 WebKit::WebTextInputType text_input_type_; |
| 286 | 289 |
| 287 typedef std::map<gfx::PluginWindowHandle, NSView*> PluginViewMap; | 290 typedef std::map<gfx::PluginWindowHandle, AcceleratedPluginView*> |
| 291 PluginViewMap; |
| 288 PluginViewMap plugin_views_; // Weak values. | 292 PluginViewMap plugin_views_; // Weak values. |
| 289 | 293 |
| 290 // Helper class for managing instances of accelerated plug-ins. | 294 // Helper class for managing instances of accelerated plug-ins. |
| 291 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; | 295 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; |
| 292 | 296 |
| 293 private: | 297 private: |
| 294 // Updates the display cursor to the current cursor if the cursor is over this | 298 // Updates the display cursor to the current cursor if the cursor is over this |
| 295 // render view. | 299 // render view. |
| 296 void UpdateCursorIfOverSelf(); | 300 void UpdateCursorIfOverSelf(); |
| 297 | 301 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // Whether or not web accessibility is enabled. | 336 // Whether or not web accessibility is enabled. |
| 333 bool renderer_accessible_; | 337 bool renderer_accessible_; |
| 334 | 338 |
| 335 // selected text on the renderer. | 339 // selected text on the renderer. |
| 336 std::string selected_text_; | 340 std::string selected_text_; |
| 337 | 341 |
| 338 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 342 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 339 }; | 343 }; |
| 340 | 344 |
| 341 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 345 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |