| 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 6 #define CONTENT_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 | 10 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 virtual void DidUpdateBackingStore( | 204 virtual void DidUpdateBackingStore( |
| 205 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, | 205 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, |
| 206 const std::vector<gfx::Rect>& copy_rects) OVERRIDE; | 206 const std::vector<gfx::Rect>& copy_rects) OVERRIDE; |
| 207 virtual void RenderViewGone(base::TerminationStatus status, | 207 virtual void RenderViewGone(base::TerminationStatus status, |
| 208 int error_code) OVERRIDE; | 208 int error_code) OVERRIDE; |
| 209 virtual void Destroy() OVERRIDE; | 209 virtual void Destroy() OVERRIDE; |
| 210 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; | 210 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; |
| 211 virtual void SelectionChanged(const string16& text, | 211 virtual void SelectionChanged(const string16& text, |
| 212 size_t offset, | 212 size_t offset, |
| 213 const ui::Range& range) OVERRIDE; | 213 const ui::Range& range) OVERRIDE; |
| 214 virtual void ShowingContextMenu(bool showing) OVERRIDE; | 214 virtual void SetShowingContextMenu(bool showing) OVERRIDE; |
| 215 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; | 215 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; |
| 216 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; | 216 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; |
| 217 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE; | 217 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE; |
| 218 // See comment in RenderWidgetHostView! | 218 // See comment in RenderWidgetHostView! |
| 219 virtual gfx::Rect GetViewCocoaBounds() const OVERRIDE; | 219 virtual gfx::Rect GetViewCocoaBounds() const OVERRIDE; |
| 220 virtual void SetActive(bool active) OVERRIDE; | 220 virtual void SetActive(bool active) OVERRIDE; |
| 221 virtual void SetWindowVisibility(bool visible) OVERRIDE; | 221 virtual void SetWindowVisibility(bool visible) OVERRIDE; |
| 222 virtual void WindowFrameChanged() OVERRIDE; | 222 virtual void WindowFrameChanged() OVERRIDE; |
| 223 virtual void SetBackground(const SkBitmap& background) OVERRIDE; | 223 virtual void SetBackground(const SkBitmap& background) OVERRIDE; |
| 224 | 224 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, | 262 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
| 263 int gpu_host_id) OVERRIDE; | 263 int gpu_host_id) OVERRIDE; |
| 264 virtual void AcceleratedSurfacePostSubBuffer( | 264 virtual void AcceleratedSurfacePostSubBuffer( |
| 265 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 265 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
| 266 int gpu_host_id) OVERRIDE; | 266 int gpu_host_id) OVERRIDE; |
| 267 virtual void AcceleratedSurfaceSuspend() OVERRIDE; | 267 virtual void AcceleratedSurfaceSuspend() OVERRIDE; |
| 268 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; | 268 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; |
| 269 virtual gfx::Rect GetRootWindowBounds() OVERRIDE; | 269 virtual gfx::Rect GetRootWindowBounds() OVERRIDE; |
| 270 virtual gfx::PluginWindowHandle GetCompositingSurface() OVERRIDE; | 270 virtual gfx::PluginWindowHandle GetCompositingSurface() OVERRIDE; |
| 271 | 271 |
| 272 // Returns |true| if a context menu is currently being shown. | |
| 273 bool is_showing_context_menu() const { return is_showing_context_menu_; } | |
| 274 | |
| 275 void DrawAcceleratedSurfaceInstance( | 272 void DrawAcceleratedSurfaceInstance( |
| 276 CGLContextObj context, | 273 CGLContextObj context, |
| 277 gfx::PluginWindowHandle plugin_handle, | 274 gfx::PluginWindowHandle plugin_handle, |
| 278 NSSize size); | 275 NSSize size); |
| 279 // Forces the textures associated with any accelerated plugin instances | 276 // Forces the textures associated with any accelerated plugin instances |
| 280 // to be reloaded. | 277 // to be reloaded. |
| 281 void ForceTextureReload(); | 278 void ForceTextureReload(); |
| 282 | 279 |
| 283 virtual void UnhandledWheelEvent( | 280 virtual void UnhandledWheelEvent( |
| 284 const WebKit::WebMouseWheelEvent& event) OVERRIDE; | 281 const WebKit::WebMouseWheelEvent& event) OVERRIDE; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 370 |
| 374 // The cursor for the page. This is passed up from the renderer. | 371 // The cursor for the page. This is passed up from the renderer. |
| 375 WebCursor current_cursor_; | 372 WebCursor current_cursor_; |
| 376 | 373 |
| 377 // Indicates if the page is loading. | 374 // Indicates if the page is loading. |
| 378 bool is_loading_; | 375 bool is_loading_; |
| 379 | 376 |
| 380 // true if the View is not visible. | 377 // true if the View is not visible. |
| 381 bool is_hidden_; | 378 bool is_hidden_; |
| 382 | 379 |
| 383 // Whether we are showing a context menu. | |
| 384 bool is_showing_context_menu_; | |
| 385 | |
| 386 // The text to be shown in the tooltip, supplied by the renderer. | 380 // The text to be shown in the tooltip, supplied by the renderer. |
| 387 string16 tooltip_text_; | 381 string16 tooltip_text_; |
| 388 | 382 |
| 389 // Factory used to safely scope delayed calls to ShutdownHost(). | 383 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 390 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; | 384 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; |
| 391 | 385 |
| 392 // selected text on the renderer. | 386 // selected text on the renderer. |
| 393 std::string selected_text_; | 387 std::string selected_text_; |
| 394 | 388 |
| 395 bool accelerated_compositing_active_; | 389 bool accelerated_compositing_active_; |
| 396 | 390 |
| 397 // When rendering transitions from gpu to software, the gpu widget can't be | 391 // When rendering transitions from gpu to software, the gpu widget can't be |
| 398 // hidden until the software backing store has been updated. This variable is | 392 // hidden until the software backing store has been updated. This variable is |
| 399 // set when the gpu widget needs to be hidden once a paint is completed. | 393 // set when the gpu widget needs to be hidden once a paint is completed. |
| 400 bool needs_gpu_visibility_update_after_repaint_; | 394 bool needs_gpu_visibility_update_after_repaint_; |
| 401 | 395 |
| 402 gfx::PluginWindowHandle compositing_surface_; | 396 gfx::PluginWindowHandle compositing_surface_; |
| 403 | 397 |
| 404 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 398 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 405 }; | 399 }; |
| 406 | 400 |
| 407 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 401 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |