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: making interface changes windows-only Created 6 years, 4 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
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
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);
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 543
538 // Used to record the last position of the mouse. 544 // Used to record the last position of the mouse.
539 // While the mouse is locked, they store the last known position just as mouse 545 // While the mouse is locked, they store the last known position just as mouse
540 // lock was entered. 546 // lock was entered.
541 // Relative to the upper-left corner of the view. 547 // Relative to the upper-left corner of the view.
542 gfx::Point unlocked_mouse_position_; 548 gfx::Point unlocked_mouse_position_;
543 // Relative to the upper-left corner of the screen. 549 // Relative to the upper-left corner of the screen.
544 gfx::Point unlocked_global_mouse_position_; 550 gfx::Point unlocked_global_mouse_position_;
545 // Last cursor position relative to screen. Used to compute movementX/Y. 551 // Last cursor position relative to screen. Used to compute movementX/Y.
546 gfx::Point global_mouse_position_; 552 gfx::Point global_mouse_position_;
547 // In mouse locked mode, we syntheticaly move the mouse cursor to the center 553 // 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. 554 // 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 555 // This flag is used to differentiate between these synthetic mouse move
550 // events vs. normal mouse move events. 556 // events vs. normal mouse move events.
551 bool synthetic_move_sent_; 557 bool synthetic_move_sent_;
552 558
553 // Used to track the state of the window we're created from. Only used when 559 // Used to track the state of the window we're created from. Only used when
554 // created fullscreen. 560 // created fullscreen.
555 scoped_ptr<aura::WindowTracker> host_tracker_; 561 scoped_ptr<aura::WindowTracker> host_tracker_;
556 562
557 // Used to track the last cursor visibility update that was sent to the 563 // Used to track the last cursor visibility update that was sent to the
558 // renderer via NotifyRendererOfCursorVisibilityState(). 564 // renderer via NotifyRendererOfCursorVisibilityState().
559 enum CursorVisibilityState { 565 enum CursorVisibilityState {
560 UNKNOWN, 566 UNKNOWN,
561 VISIBLE, 567 VISIBLE,
562 NOT_VISIBLE, 568 NOT_VISIBLE,
563 }; 569 };
564 CursorVisibilityState cursor_visibility_state_in_renderer_; 570 CursorVisibilityState cursor_visibility_state_in_renderer_;
565 571
566 #if defined(OS_WIN) 572 #if defined(OS_WIN)
567 // The list of rectangles from constrained windows over this view. Windowed 573 // The list of rectangles from constrained windows over this view. Windowed
568 // NPAPI plugins shouldn't draw over them. 574 // NPAPI plugins shouldn't draw over them.
569 std::vector<gfx::Rect> constrained_rects_; 575 std::vector<gfx::Rect> constrained_rects_;
570 576
571 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; 577 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves;
572 // Contains information about each windowed plugin's clip and cutout rects ( 578 // Contains information about each windowed plugin's clip and cutout rects (
573 // from the renderer). This is needed because when the transient windoiws 579 // 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 580 // over this view changes, we need this information in order to create a new
575 // region for the HWND. 581 // region for the HWND.
576 PluginWindowMoves plugin_window_moves_; 582 PluginWindowMoves plugin_window_moves_;
577 583
578 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used 584 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used
579 // for accessibility, as the container for windowless plugins like 585 // for accessibility, as the container for windowless plugins like
580 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, 586 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads,
581 // etc. 587 // etc.
582 // The LegacyRenderWidgetHostHWND instance is created during the first call 588 // The LegacyRenderWidgetHostHWND instance is created during the first call
583 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed 589 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed
(...skipping 15 matching lines...) Expand all
599 scoped_ptr<OverscrollController> overscroll_controller_; 605 scoped_ptr<OverscrollController> overscroll_controller_;
600 606
601 gfx::Insets insets_; 607 gfx::Insets insets_;
602 608
603 std::vector<ui::LatencyInfo> software_latency_info_; 609 std::vector<ui::LatencyInfo> software_latency_info_;
604 610
605 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; 611 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_;
606 612
607 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 613 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
608 614
615 gfx::Rect disambiguation_target_rect_;
616
609 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 617 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
610 }; 618 };
611 619
612 } // namespace content 620 } // namespace content
613 621
614 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 622 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698