| 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_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() | 216 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() |
| 217 OVERRIDE; | 217 OVERRIDE; |
| 218 virtual InputEventAckState FilterInputEvent( | 218 virtual InputEventAckState FilterInputEvent( |
| 219 const blink::WebInputEvent& input_event) OVERRIDE; | 219 const blink::WebInputEvent& input_event) OVERRIDE; |
| 220 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; | 220 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; |
| 221 virtual BrowserAccessibilityManager* CreateBrowserAccessibilityManager( | 221 virtual BrowserAccessibilityManager* CreateBrowserAccessibilityManager( |
| 222 BrowserAccessibilityDelegate* delegate) OVERRIDE; | 222 BrowserAccessibilityDelegate* delegate) OVERRIDE; |
| 223 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() OVERRIDE; | 223 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() OVERRIDE; |
| 224 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() | 224 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() |
| 225 OVERRIDE; | 225 OVERRIDE; |
| 226 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, |
| 227 const SkBitmap& zoomed_bitmap) OVERRIDE; |
| 226 virtual bool LockMouse() OVERRIDE; | 228 virtual bool LockMouse() OVERRIDE; |
| 227 virtual void UnlockMouse() OVERRIDE; | 229 virtual void UnlockMouse() OVERRIDE; |
| 228 virtual void OnSwapCompositorFrame( | 230 virtual void OnSwapCompositorFrame( |
| 229 uint32 output_surface_id, | 231 uint32 output_surface_id, |
| 230 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; | 232 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; |
| 231 | 233 |
| 232 #if defined(OS_WIN) | 234 #if defined(OS_WIN) |
| 233 virtual void SetParentNativeViewAccessible( | 235 virtual void SetParentNativeViewAccessible( |
| 234 gfx::NativeViewAccessible accessible_parent) OVERRIDE; | 236 gfx::NativeViewAccessible accessible_parent) OVERRIDE; |
| 235 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; | 237 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 // Sets the cutout rects from constrained windows. These are rectangles that | 325 // Sets the cutout rects from constrained windows. These are rectangles that |
| 324 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout | 326 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout |
| 325 // rects. | 327 // rects. |
| 326 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); | 328 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); |
| 327 | 329 |
| 328 // Updates the cursor clip region. Used for mouse locking. | 330 // Updates the cursor clip region. Used for mouse locking. |
| 329 void UpdateMouseLockRegion(); | 331 void UpdateMouseLockRegion(); |
| 330 | 332 |
| 331 // Notification that the LegacyRenderWidgetHostHWND was destroyed. | 333 // Notification that the LegacyRenderWidgetHostHWND was destroyed. |
| 332 void OnLegacyWindowDestroyed(); | 334 void OnLegacyWindowDestroyed(); |
| 335 |
| 336 void DisambiguationPopupRendered(bool success, const SkBitmap& result); |
| 337 |
| 338 void HideDisambiguationPopup(); |
| 333 #endif | 339 #endif |
| 334 | 340 |
| 335 // Method to indicate if this instance is shutting down or closing. | 341 // Method to indicate if this instance is shutting down or closing. |
| 336 // TODO(shrikant): Discuss around to see if it makes sense to add this method | 342 // TODO(shrikant): Discuss around to see if it makes sense to add this method |
| 337 // as part of RenderWidgetHostView. | 343 // as part of RenderWidgetHostView. |
| 338 bool IsClosing() const { return in_shutdown_; } | 344 bool IsClosing() const { return in_shutdown_; } |
| 339 | 345 |
| 340 // Sets whether the overscroll controller should be enabled for this page. | 346 // Sets whether the overscroll controller should be enabled for this page. |
| 341 void SetOverscrollControllerEnabled(bool enabled); | 347 void SetOverscrollControllerEnabled(bool enabled); |
| 342 | 348 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 | 541 |
| 536 // Used to record the last position of the mouse. | 542 // Used to record the last position of the mouse. |
| 537 // While the mouse is locked, they store the last known position just as mouse | 543 // While the mouse is locked, they store the last known position just as mouse |
| 538 // lock was entered. | 544 // lock was entered. |
| 539 // Relative to the upper-left corner of the view. | 545 // Relative to the upper-left corner of the view. |
| 540 gfx::Point unlocked_mouse_position_; | 546 gfx::Point unlocked_mouse_position_; |
| 541 // Relative to the upper-left corner of the screen. | 547 // Relative to the upper-left corner of the screen. |
| 542 gfx::Point unlocked_global_mouse_position_; | 548 gfx::Point unlocked_global_mouse_position_; |
| 543 // Last cursor position relative to screen. Used to compute movementX/Y. | 549 // Last cursor position relative to screen. Used to compute movementX/Y. |
| 544 gfx::Point global_mouse_position_; | 550 gfx::Point global_mouse_position_; |
| 545 // In mouse locked mode, we syntheticaly move the mouse cursor to the center | 551 // In mouse locked mode, we synthetically move the mouse cursor to the center |
| 546 // of the window when it reaches the window borders to avoid it going outside. | 552 // of the window when it reaches the window borders to avoid it going outside. |
| 547 // This flag is used to differentiate between these synthetic mouse move | 553 // This flag is used to differentiate between these synthetic mouse move |
| 548 // events vs. normal mouse move events. | 554 // events vs. normal mouse move events. |
| 549 bool synthetic_move_sent_; | 555 bool synthetic_move_sent_; |
| 550 | 556 |
| 551 // Used to track the state of the window we're created from. Only used when | 557 // Used to track the state of the window we're created from. Only used when |
| 552 // created fullscreen. | 558 // created fullscreen. |
| 553 scoped_ptr<aura::WindowTracker> host_tracker_; | 559 scoped_ptr<aura::WindowTracker> host_tracker_; |
| 554 | 560 |
| 555 // Used to track the last cursor visibility update that was sent to the | 561 // Used to track the last cursor visibility update that was sent to the |
| 556 // renderer via NotifyRendererOfCursorVisibilityState(). | 562 // renderer via NotifyRendererOfCursorVisibilityState(). |
| 557 enum CursorVisibilityState { | 563 enum CursorVisibilityState { |
| 558 UNKNOWN, | 564 UNKNOWN, |
| 559 VISIBLE, | 565 VISIBLE, |
| 560 NOT_VISIBLE, | 566 NOT_VISIBLE, |
| 561 }; | 567 }; |
| 562 CursorVisibilityState cursor_visibility_state_in_renderer_; | 568 CursorVisibilityState cursor_visibility_state_in_renderer_; |
| 563 | 569 |
| 564 #if defined(OS_WIN) | 570 #if defined(OS_WIN) |
| 565 // The list of rectangles from constrained windows over this view. Windowed | 571 // The list of rectangles from constrained windows over this view. Windowed |
| 566 // NPAPI plugins shouldn't draw over them. | 572 // NPAPI plugins shouldn't draw over them. |
| 567 std::vector<gfx::Rect> constrained_rects_; | 573 std::vector<gfx::Rect> constrained_rects_; |
| 568 | 574 |
| 569 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; | 575 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; |
| 570 // Contains information about each windowed plugin's clip and cutout rects ( | 576 // Contains information about each windowed plugin's clip and cutout rects ( |
| 571 // from the renderer). This is needed because when the transient windoiws | 577 // from the renderer). This is needed because when the transient windows |
| 572 // over this view changes, we need this information in order to create a new | 578 // over this view changes, we need this information in order to create a new |
| 573 // region for the HWND. | 579 // region for the HWND. |
| 574 PluginWindowMoves plugin_window_moves_; | 580 PluginWindowMoves plugin_window_moves_; |
| 575 | 581 |
| 576 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used | 582 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used |
| 577 // for accessibility, as the container for windowless plugins like | 583 // for accessibility, as the container for windowless plugins like |
| 578 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, | 584 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, |
| 579 // etc. | 585 // etc. |
| 580 // The LegacyRenderWidgetHostHWND instance is created during the first call | 586 // The LegacyRenderWidgetHostHWND instance is created during the first call |
| 581 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed | 587 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed |
| (...skipping 18 matching lines...) Expand all Loading... |
| 600 gfx::Vector2dF last_scroll_offset_; | 606 gfx::Vector2dF last_scroll_offset_; |
| 601 | 607 |
| 602 gfx::Insets insets_; | 608 gfx::Insets insets_; |
| 603 | 609 |
| 604 std::vector<ui::LatencyInfo> software_latency_info_; | 610 std::vector<ui::LatencyInfo> software_latency_info_; |
| 605 | 611 |
| 606 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; | 612 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; |
| 607 | 613 |
| 608 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 614 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
| 609 | 615 |
| 616 gfx::Rect disambiguation_target_rect_; |
| 617 |
| 610 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 618 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 611 }; | 619 }; |
| 612 | 620 |
| 613 } // namespace content | 621 } // namespace content |
| 614 | 622 |
| 615 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 623 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |