Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 351683002: Adds link disambiguation popup support to Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: attempt to fix athena build Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() 220 virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
221 OVERRIDE; 221 OVERRIDE;
222 virtual InputEventAckState FilterInputEvent( 222 virtual InputEventAckState FilterInputEvent(
223 const blink::WebInputEvent& input_event) OVERRIDE; 223 const blink::WebInputEvent& input_event) OVERRIDE;
224 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; 224 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
225 virtual BrowserAccessibilityManager* CreateBrowserAccessibilityManager( 225 virtual BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
226 BrowserAccessibilityDelegate* delegate) OVERRIDE; 226 BrowserAccessibilityDelegate* delegate) OVERRIDE;
227 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() OVERRIDE; 227 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() OVERRIDE;
228 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() 228 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible()
229 OVERRIDE; 229 OVERRIDE;
230 virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
231 const SkBitmap& zoomed_bitmap) OVERRIDE;
230 virtual bool LockMouse() OVERRIDE; 232 virtual bool LockMouse() OVERRIDE;
231 virtual void UnlockMouse() OVERRIDE; 233 virtual void UnlockMouse() OVERRIDE;
232 virtual void OnSwapCompositorFrame( 234 virtual void OnSwapCompositorFrame(
233 uint32 output_surface_id, 235 uint32 output_surface_id,
234 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; 236 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE;
235 virtual void DidStopFlinging() OVERRIDE; 237 virtual void DidStopFlinging() OVERRIDE;
236 238
237 #if defined(OS_WIN) 239 #if defined(OS_WIN)
238 virtual void SetParentNativeViewAccessible( 240 virtual void SetParentNativeViewAccessible(
239 gfx::NativeViewAccessible accessible_parent) OVERRIDE; 241 gfx::NativeViewAccessible accessible_parent) OVERRIDE;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // rects. 332 // rects.
331 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); 333 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects);
332 334
333 // Updates the cursor clip region. Used for mouse locking. 335 // Updates the cursor clip region. Used for mouse locking.
334 void UpdateMouseLockRegion(); 336 void UpdateMouseLockRegion();
335 337
336 // Notification that the LegacyRenderWidgetHostHWND was destroyed. 338 // Notification that the LegacyRenderWidgetHostHWND was destroyed.
337 void OnLegacyWindowDestroyed(); 339 void OnLegacyWindowDestroyed();
338 #endif 340 #endif
339 341
342 void DisambiguationPopupRendered(bool success, const SkBitmap& result);
343
344 void HideDisambiguationPopup();
345
346 void ProcessDisambiguationGesture(ui::GestureEvent* event);
347
348 void ProcessDisambiguationMouse(ui::MouseEvent* event);
349
340 // Method to indicate if this instance is shutting down or closing. 350 // Method to indicate if this instance is shutting down or closing.
341 // TODO(shrikant): Discuss around to see if it makes sense to add this method 351 // TODO(shrikant): Discuss around to see if it makes sense to add this method
342 // as part of RenderWidgetHostView. 352 // as part of RenderWidgetHostView.
343 bool IsClosing() const { return in_shutdown_; } 353 bool IsClosing() const { return in_shutdown_; }
344 354
345 // Sets whether the overscroll controller should be enabled for this page. 355 // Sets whether the overscroll controller should be enabled for this page.
346 void SetOverscrollControllerEnabled(bool enabled); 356 void SetOverscrollControllerEnabled(bool enabled);
347 357
348 void SnapToPhysicalPixelBoundary(); 358 void SnapToPhysicalPixelBoundary();
349 359
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 555
546 // Used to record the last position of the mouse. 556 // Used to record the last position of the mouse.
547 // While the mouse is locked, they store the last known position just as mouse 557 // While the mouse is locked, they store the last known position just as mouse
548 // lock was entered. 558 // lock was entered.
549 // Relative to the upper-left corner of the view. 559 // Relative to the upper-left corner of the view.
550 gfx::Point unlocked_mouse_position_; 560 gfx::Point unlocked_mouse_position_;
551 // Relative to the upper-left corner of the screen. 561 // Relative to the upper-left corner of the screen.
552 gfx::Point unlocked_global_mouse_position_; 562 gfx::Point unlocked_global_mouse_position_;
553 // Last cursor position relative to screen. Used to compute movementX/Y. 563 // Last cursor position relative to screen. Used to compute movementX/Y.
554 gfx::Point global_mouse_position_; 564 gfx::Point global_mouse_position_;
555 // In mouse locked mode, we syntheticaly move the mouse cursor to the center 565 // In mouse locked mode, we synthetically move the mouse cursor to the center
556 // of the window when it reaches the window borders to avoid it going outside. 566 // of the window when it reaches the window borders to avoid it going outside.
557 // This flag is used to differentiate between these synthetic mouse move 567 // This flag is used to differentiate between these synthetic mouse move
558 // events vs. normal mouse move events. 568 // events vs. normal mouse move events.
559 bool synthetic_move_sent_; 569 bool synthetic_move_sent_;
560 570
561 // Used to track the state of the window we're created from. Only used when 571 // Used to track the state of the window we're created from. Only used when
562 // created fullscreen. 572 // created fullscreen.
563 scoped_ptr<aura::WindowTracker> host_tracker_; 573 scoped_ptr<aura::WindowTracker> host_tracker_;
564 574
565 // Used to track the last cursor visibility update that was sent to the 575 // Used to track the last cursor visibility update that was sent to the
566 // renderer via NotifyRendererOfCursorVisibilityState(). 576 // renderer via NotifyRendererOfCursorVisibilityState().
567 enum CursorVisibilityState { 577 enum CursorVisibilityState {
568 UNKNOWN, 578 UNKNOWN,
569 VISIBLE, 579 VISIBLE,
570 NOT_VISIBLE, 580 NOT_VISIBLE,
571 }; 581 };
572 CursorVisibilityState cursor_visibility_state_in_renderer_; 582 CursorVisibilityState cursor_visibility_state_in_renderer_;
573 583
574 #if defined(OS_WIN) 584 #if defined(OS_WIN)
575 // The list of rectangles from constrained windows over this view. Windowed 585 // The list of rectangles from constrained windows over this view. Windowed
576 // NPAPI plugins shouldn't draw over them. 586 // NPAPI plugins shouldn't draw over them.
577 std::vector<gfx::Rect> constrained_rects_; 587 std::vector<gfx::Rect> constrained_rects_;
578 588
579 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; 589 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves;
580 // Contains information about each windowed plugin's clip and cutout rects ( 590 // Contains information about each windowed plugin's clip and cutout rects (
581 // from the renderer). This is needed because when the transient windoiws 591 // from the renderer). This is needed because when the transient windows
582 // over this view changes, we need this information in order to create a new 592 // over this view changes, we need this information in order to create a new
583 // region for the HWND. 593 // region for the HWND.
584 PluginWindowMoves plugin_window_moves_; 594 PluginWindowMoves plugin_window_moves_;
585 595
586 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used 596 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used
587 // for accessibility, as the container for windowless plugins like 597 // for accessibility, as the container for windowless plugins like
588 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, 598 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads,
589 // etc. 599 // etc.
590 // The LegacyRenderWidgetHostHWND instance is created during the first call 600 // The LegacyRenderWidgetHostHWND instance is created during the first call
591 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed 601 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed
(...skipping 18 matching lines...) Expand all
610 gfx::Vector2dF last_scroll_offset_; 620 gfx::Vector2dF last_scroll_offset_;
611 621
612 gfx::Insets insets_; 622 gfx::Insets insets_;
613 623
614 std::vector<ui::LatencyInfo> software_latency_info_; 624 std::vector<ui::LatencyInfo> software_latency_info_;
615 625
616 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; 626 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_;
617 627
618 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 628 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
619 629
630 gfx::Rect disambiguation_target_rect_;
631
632 // The last scroll offset when we start to render the link disambiguation
633 // view, so we can ensure the window hasn't moved between copying from the
634 // compositing surface and showing the disambiguation popup.
635 gfx::Vector2dF disambiguation_scroll_offset_;
636
620 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 637 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
621 }; 638 };
622 639
623 } // namespace content 640 } // namespace content
624 641
625 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 642 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698