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