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

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: responding to cpu's feedback Created 6 years, 5 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 virtual void ProcessAckedTouchEvent( 213 virtual void ProcessAckedTouchEvent(
214 const TouchEventWithLatencyInfo& touch, 214 const TouchEventWithLatencyInfo& touch,
215 InputEventAckState ack_result) OVERRIDE; 215 InputEventAckState ack_result) OVERRIDE;
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 #if defined(OS_WIN)
224 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect,
225 const SkBitmap& zoomed_bitmap) OVERRIDE;
226 #endif
223 virtual bool LockMouse() OVERRIDE; 227 virtual bool LockMouse() OVERRIDE;
224 virtual void UnlockMouse() OVERRIDE; 228 virtual void UnlockMouse() OVERRIDE;
225 virtual void OnSwapCompositorFrame( 229 virtual void OnSwapCompositorFrame(
226 uint32 output_surface_id, 230 uint32 output_surface_id,
227 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; 231 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE;
228 232
229 #if defined(OS_WIN) 233 #if defined(OS_WIN)
230 virtual void SetParentNativeViewAccessible( 234 virtual void SetParentNativeViewAccessible(
231 gfx::NativeViewAccessible accessible_parent) OVERRIDE; 235 gfx::NativeViewAccessible accessible_parent) OVERRIDE;
232 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; 236 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 const gfx::Point& location) OVERRIDE; 287 const gfx::Point& location) OVERRIDE;
284 virtual bool CanFocus() OVERRIDE; 288 virtual bool CanFocus() OVERRIDE;
285 virtual void OnCaptureLost() OVERRIDE; 289 virtual void OnCaptureLost() OVERRIDE;
286 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 290 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
287 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; 291 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
288 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; 292 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
289 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; 293 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
290 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE; 294 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE;
291 virtual bool HasHitTestMask() const OVERRIDE; 295 virtual bool HasHitTestMask() const OVERRIDE;
292 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; 296 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE;
297 virtual void OnLinkDisambiguationPopupRequested(
298 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) OVERRIDE;
293 299
294 // Overridden from ui::EventHandler: 300 // Overridden from ui::EventHandler:
295 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; 301 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
296 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; 302 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
297 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; 303 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
298 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; 304 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
299 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 305 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
300 306
301 // Overridden from aura::client::ActivationDelegate: 307 // Overridden from aura::client::ActivationDelegate:
302 virtual bool ShouldActivate() const OVERRIDE; 308 virtual bool ShouldActivate() const OVERRIDE;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 534
529 // Used to record the last position of the mouse. 535 // Used to record the last position of the mouse.
530 // While the mouse is locked, they store the last known position just as mouse 536 // While the mouse is locked, they store the last known position just as mouse
531 // lock was entered. 537 // lock was entered.
532 // Relative to the upper-left corner of the view. 538 // Relative to the upper-left corner of the view.
533 gfx::Point unlocked_mouse_position_; 539 gfx::Point unlocked_mouse_position_;
534 // Relative to the upper-left corner of the screen. 540 // Relative to the upper-left corner of the screen.
535 gfx::Point unlocked_global_mouse_position_; 541 gfx::Point unlocked_global_mouse_position_;
536 // Last cursor position relative to screen. Used to compute movementX/Y. 542 // Last cursor position relative to screen. Used to compute movementX/Y.
537 gfx::Point global_mouse_position_; 543 gfx::Point global_mouse_position_;
538 // In mouse locked mode, we syntheticaly move the mouse cursor to the center 544 // In mouse locked mode, we synthetically move the mouse cursor to the center
539 // of the window when it reaches the window borders to avoid it going outside. 545 // of the window when it reaches the window borders to avoid it going outside.
540 // This flag is used to differentiate between these synthetic mouse move 546 // This flag is used to differentiate between these synthetic mouse move
541 // events vs. normal mouse move events. 547 // events vs. normal mouse move events.
542 bool synthetic_move_sent_; 548 bool synthetic_move_sent_;
543 549
544 // Used to track the state of the window we're created from. Only used when 550 // Used to track the state of the window we're created from. Only used when
545 // created fullscreen. 551 // created fullscreen.
546 scoped_ptr<aura::WindowTracker> host_tracker_; 552 scoped_ptr<aura::WindowTracker> host_tracker_;
547 553
548 // Used to track the last cursor visibility update that was sent to the 554 // Used to track the last cursor visibility update that was sent to the
549 // renderer via NotifyRendererOfCursorVisibilityState(). 555 // renderer via NotifyRendererOfCursorVisibilityState().
550 enum CursorVisibilityState { 556 enum CursorVisibilityState {
551 UNKNOWN, 557 UNKNOWN,
552 VISIBLE, 558 VISIBLE,
553 NOT_VISIBLE, 559 NOT_VISIBLE,
554 }; 560 };
555 CursorVisibilityState cursor_visibility_state_in_renderer_; 561 CursorVisibilityState cursor_visibility_state_in_renderer_;
556 562
557 #if defined(OS_WIN) 563 #if defined(OS_WIN)
558 // The list of rectangles from constrained windows over this view. Windowed 564 // The list of rectangles from constrained windows over this view. Windowed
559 // NPAPI plugins shouldn't draw over them. 565 // NPAPI plugins shouldn't draw over them.
560 std::vector<gfx::Rect> constrained_rects_; 566 std::vector<gfx::Rect> constrained_rects_;
561 567
562 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; 568 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves;
563 // Contains information about each windowed plugin's clip and cutout rects ( 569 // Contains information about each windowed plugin's clip and cutout rects (
564 // from the renderer). This is needed because when the transient windoiws 570 // from the renderer). This is needed because when the transient windows
565 // over this view changes, we need this information in order to create a new 571 // over this view changes, we need this information in order to create a new
566 // region for the HWND. 572 // region for the HWND.
567 PluginWindowMoves plugin_window_moves_; 573 PluginWindowMoves plugin_window_moves_;
568 574
569 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used 575 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used
570 // for accessibility, as the container for windowless plugins like 576 // for accessibility, as the container for windowless plugins like
571 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, 577 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads,
572 // etc. 578 // etc.
573 // The LegacyRenderWidgetHostHWND instance is created during the first call 579 // The LegacyRenderWidgetHostHWND instance is created during the first call
574 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed 580 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed
(...skipping 19 matching lines...) Expand all
594 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; 600 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_;
595 601
596 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 602 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
597 603
598 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 604 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
599 }; 605 };
600 606
601 } // namespace content 607 } // namespace content
602 608
603 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 609 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698