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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
13 #include "base/callback.h"
14 #include "base/gtest_prod_util.h"
15 #include "base/memory/linked_ptr.h"
16 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/weak_ptr.h"
19 #include "content/browser/accessibility/browser_accessibility_manager.h"
20 #include "content/browser/compositor/delegated_frame_host.h"
21 #include "content/browser/compositor/image_transport_factory.h"
22 #include "content/browser/compositor/owned_mailbox.h"
23 #include "content/browser/renderer_host/render_widget_host_view_base.h"
24 #include "content/common/content_export.h"
25 #include "content/common/cursors/webcursor.h"
26 #include "third_party/skia/include/core/SkRegion.h"
27 #include "ui/aura/client/cursor_client_observer.h"
28 #include "ui/aura/client/focus_change_observer.h"
29 #include "ui/aura/window_delegate.h"
30 #include "ui/aura/window_tree_host_observer.h"
31 #include "ui/base/ime/text_input_client.h"
32 #include "ui/gfx/display_observer.h"
33 #include "ui/gfx/insets.h"
34 #include "ui/gfx/rect.h"
35 #include "ui/wm/public/activation_change_observer.h"
36 #include "ui/wm/public/activation_delegate.h"
41 class ScopedTooltipDisabler;
46 class CopyOutputRequest;
47 class CopyOutputResult;
48 class DelegatedFrameData;
69 class LegacyRenderWidgetHostHWND;
72 class OverscrollController;
73 class RenderFrameHostImpl;
74 class RenderWidgetHostImpl;
75 class RenderWidgetHostView;
77 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
78 class CONTENT_EXPORT RenderWidgetHostViewAura
79 : public RenderWidgetHostViewBase,
80 public DelegatedFrameHostClient,
81 public ui::TextInputClient,
82 public gfx::DisplayObserver,
83 public aura::WindowTreeHostObserver,
84 public aura::WindowDelegate,
85 public aura::client::ActivationDelegate,
86 public aura::client::ActivationChangeObserver,
87 public aura::client::FocusChangeObserver,
88 public aura::client::CursorClientObserver,
89 public base::SupportsWeakPtr<RenderWidgetHostViewAura> {
91 // Displays and controls touch editing elements such as selection handles.
92 class TouchEditingClient {
94 TouchEditingClient() {}
96 // Tells the client to start showing touch editing handles.
97 virtual void StartTouchEditing() = 0;
99 // Notifies the client that touch editing is no longer needed. |quick|
100 // determines whether the handles should fade out quickly or slowly.
101 virtual void EndTouchEditing(bool quick) = 0;
103 // Notifies the client that the selection bounds need to be updated.
104 virtual void OnSelectionOrCursorChanged(const gfx::Rect& anchor,
105 const gfx::Rect& focus) = 0;
107 // Notifies the client that the current text input type as changed.
108 virtual void OnTextInputTypeChanged(ui::TextInputType type) = 0;
110 // Notifies the client that an input event is about to be sent to the
111 // renderer. Returns true if the client wants to stop event propagation.
112 virtual bool HandleInputEvent(const ui::Event* event) = 0;
114 // Notifies the client that a gesture event ack was received.
115 virtual void GestureEventAck(int gesture_event_type) = 0;
117 // Notifies the client that the fling has ended, so it can activate touch
118 // editing if needed.
119 virtual void DidStopFlinging() = 0;
121 // This is called when the view is destroyed, so that the client can
122 // perform any necessary clean-up.
123 virtual void OnViewDestroyed() = 0;
126 virtual ~TouchEditingClient() {}
129 void set_touch_editing_client(TouchEditingClient* client) {
130 touch_editing_client_ = client;
133 // When |is_guest_view_hack| is true, this view isn't really the view for
134 // the |widget|, a RenderWidgetHostViewGuest is.
136 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated
137 // to use RWHVChildFrame (http://crbug.com/330264).
138 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack);
140 // RenderWidgetHostView implementation.
141 bool OnMessageReceived(const IPC::Message& msg) override;
142 void InitAsChild(gfx::NativeView parent_view) override;
143 RenderWidgetHost* GetRenderWidgetHost() const override;
144 void SetSize(const gfx::Size& size) override;
145 void SetBounds(const gfx::Rect& rect) override;
146 gfx::Vector2dF GetLastScrollOffset() const override;
147 gfx::NativeView GetNativeView() const override;
148 gfx::NativeViewId GetNativeViewId() const override;
149 gfx::NativeViewAccessible GetNativeViewAccessible() override;
150 ui::TextInputClient* GetTextInputClient() override;
151 bool HasFocus() const override;
152 bool IsSurfaceAvailableForCopy() const override;
153 void Show() override;
154 void Hide() override;
155 bool IsShowing() override;
156 gfx::Rect GetViewBounds() const override;
157 void SetBackgroundColor(SkColor color) override;
158 gfx::Size GetVisibleViewportSize() const override;
159 void SetInsets(const gfx::Insets& insets) override;
161 // Overridden from RenderWidgetHostViewBase:
162 void InitAsPopup(RenderWidgetHostView* parent_host_view,
163 const gfx::Rect& pos) override;
164 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
165 void WasShown() override;
166 void WasHidden() override;
167 void MovePluginWindows(const std::vector<WebPluginGeometry>& moves) override;
168 void Focus() override;
169 void Blur() override;
170 void UpdateCursor(const WebCursor& cursor) override;
171 void SetIsLoading(bool is_loading) override;
172 void TextInputTypeChanged(ui::TextInputType type,
173 ui::TextInputMode input_mode,
174 bool can_compose_inline,
176 void ImeCancelComposition() override;
177 void ImeCompositionRangeChanged(
178 const gfx::Range& range,
179 const std::vector<gfx::Rect>& character_bounds) override;
180 void RenderProcessGone(base::TerminationStatus status,
181 int error_code) override;
182 void Destroy() override;
183 void SetTooltipText(const base::string16& tooltip_text) override;
184 void SelectionChanged(const base::string16& text,
186 const gfx::Range& range) override;
187 gfx::Size GetRequestedRendererSize() const override;
188 void SelectionBoundsChanged(
189 const ViewHostMsg_SelectionBounds_Params& params) override;
190 void CopyFromCompositingSurface(const gfx::Rect& src_subrect,
191 const gfx::Size& dst_size,
192 CopyFromCompositingSurfaceCallback& callback,
193 const SkColorType color_type) override;
194 void CopyFromCompositingSurfaceToVideoFrame(
195 const gfx::Rect& src_subrect,
196 const scoped_refptr<media::VideoFrame>& target,
197 const base::Callback<void(bool)>& callback) override;
198 bool CanCopyToVideoFrame() const override;
199 bool CanSubscribeFrame() const override;
200 void BeginFrameSubscription(
201 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
202 void EndFrameSubscription() override;
203 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
204 void GetScreenInfo(blink::WebScreenInfo* results) override;
205 gfx::Rect GetBoundsInRootWindow() override;
206 void WheelEventAck(const blink::WebMouseWheelEvent& event,
207 InputEventAckState ack_result) override;
208 void GestureEventAck(const blink::WebGestureEvent& event,
209 InputEventAckState ack_result) override;
210 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
211 InputEventAckState ack_result) override;
212 scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() override;
213 InputEventAckState FilterInputEvent(
214 const blink::WebInputEvent& input_event) override;
215 gfx::GLSurfaceHandle GetCompositingSurface() override;
216 BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
217 BrowserAccessibilityDelegate* delegate) override;
218 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override;
219 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override;
220 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
221 const SkBitmap& zoomed_bitmap) override;
222 bool LockMouse() override;
223 void UnlockMouse() override;
224 void OnSwapCompositorFrame(uint32 output_surface_id,
225 scoped_ptr<cc::CompositorFrame> frame) override;
226 void DidStopFlinging() override;
229 void SetLegacyRenderWidgetHostHWND(LegacyRenderWidgetHostHWND* legacy_hwnd);
230 virtual void SetParentNativeViewAccessible(
231 gfx::NativeViewAccessible accessible_parent) override;
232 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const override;
235 // Overridden from ui::TextInputClient:
236 void SetCompositionText(const ui::CompositionText& composition) override;
237 void ConfirmCompositionText() override;
238 void ClearCompositionText() override;
239 void InsertText(const base::string16& text) override;
240 void InsertChar(base::char16 ch, int flags) override;
241 gfx::NativeWindow GetAttachedWindow() const override;
242 ui::TextInputType GetTextInputType() const override;
243 ui::TextInputMode GetTextInputMode() const override;
244 int GetTextInputFlags() const override;
245 bool CanComposeInline() const override;
246 gfx::Rect GetCaretBounds() const override;
247 bool GetCompositionCharacterBounds(uint32 index,
248 gfx::Rect* rect) const override;
249 bool HasCompositionText() const override;
250 bool GetTextRange(gfx::Range* range) const override;
251 bool GetCompositionTextRange(gfx::Range* range) const override;
252 bool GetSelectionRange(gfx::Range* range) const override;
253 bool SetSelectionRange(const gfx::Range& range) override;
254 bool DeleteRange(const gfx::Range& range) override;
255 bool GetTextFromRange(const gfx::Range& range,
256 base::string16* text) const override;
257 void OnInputMethodChanged() override;
258 bool ChangeTextDirectionAndLayoutAlignment(
259 base::i18n::TextDirection direction) override;
260 void ExtendSelectionAndDelete(size_t before, size_t after) override;
261 void EnsureCaretInRect(const gfx::Rect& rect) override;
262 void OnCandidateWindowShown() override;
263 void OnCandidateWindowUpdated() override;
264 void OnCandidateWindowHidden() override;
265 bool IsEditingCommandEnabled(int command_id) override;
266 void ExecuteEditingCommand(int command_id) override;
268 // Overridden from gfx::DisplayObserver:
269 void OnDisplayAdded(const gfx::Display& new_display) override;
270 void OnDisplayRemoved(const gfx::Display& old_display) override;
271 void OnDisplayMetricsChanged(const gfx::Display& display,
272 uint32_t metrics) override;
274 // Overridden from aura::WindowDelegate:
275 gfx::Size GetMinimumSize() const override;
276 gfx::Size GetMaximumSize() const override;
277 void OnBoundsChanged(const gfx::Rect& old_bounds,
278 const gfx::Rect& new_bounds) override;
279 gfx::NativeCursor GetCursor(const gfx::Point& point) override;
280 int GetNonClientComponent(const gfx::Point& point) const override;
281 bool ShouldDescendIntoChildForEventHandling(
283 const gfx::Point& location) override;
284 bool CanFocus() override;
285 void OnCaptureLost() override;
286 void OnPaint(gfx::Canvas* canvas) override;
287 void OnDeviceScaleFactorChanged(float device_scale_factor) override;
288 void OnWindowDestroying(aura::Window* window) override;
289 void OnWindowDestroyed(aura::Window* window) override;
290 void OnWindowTargetVisibilityChanged(bool visible) override;
291 bool HasHitTestMask() const override;
292 void GetHitTestMask(gfx::Path* mask) const override;
294 // Overridden from ui::EventHandler:
295 void OnKeyEvent(ui::KeyEvent* event) override;
296 void OnMouseEvent(ui::MouseEvent* event) override;
297 void OnScrollEvent(ui::ScrollEvent* event) override;
298 void OnTouchEvent(ui::TouchEvent* event) override;
299 void OnGestureEvent(ui::GestureEvent* event) override;
301 // Overridden from aura::client::ActivationDelegate:
302 bool ShouldActivate() const override;
304 // Overridden from aura::client::ActivationChangeObserver:
305 void OnWindowActivated(aura::Window* gained_activation,
306 aura::Window* lost_activation) override;
308 // Overridden from aura::client::CursorClientObserver:
309 void OnCursorVisibilityChanged(bool is_visible) override;
311 // Overridden from aura::client::FocusChangeObserver:
312 void OnWindowFocused(aura::Window* gained_focus,
313 aura::Window* lost_focus) override;
315 // Overridden from aura::WindowTreeHostObserver:
316 void OnHostMoved(const aura::WindowTreeHost* host,
317 const gfx::Point& new_origin) override;
319 void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params);
322 // Sets the cutout rects from constrained windows. These are rectangles that
323 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout
325 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects);
327 // Updates the cursor clip region. Used for mouse locking.
328 void UpdateMouseLockRegion();
331 void DisambiguationPopupRendered(bool success, const SkBitmap& result);
333 void HideDisambiguationPopup();
335 void ProcessDisambiguationGesture(ui::GestureEvent* event);
337 void ProcessDisambiguationMouse(ui::MouseEvent* event);
339 // Method to indicate if this instance is shutting down or closing.
340 // TODO(shrikant): Discuss around to see if it makes sense to add this method
341 // as part of RenderWidgetHostView.
342 bool IsClosing() const { return in_shutdown_; }
344 // Sets whether the overscroll controller should be enabled for this page.
345 void SetOverscrollControllerEnabled(bool enabled);
347 void SnapToPhysicalPixelBoundary();
349 OverscrollController* overscroll_controller() const {
350 return overscroll_controller_.get();
354 ~RenderWidgetHostViewAura() override;
356 // Exposed for tests.
357 aura::Window* window() { return window_; }
358 SkColorType PreferredReadbackFormat() override;
359 DelegatedFrameHost* GetDelegatedFrameHost() const override;
362 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
363 PopupRetainsCaptureAfterMouseRelease);
364 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText);
365 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState);
366 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
367 TouchEventPositionsArentRounded);
368 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync);
369 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow);
370 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, RecreateLayers);
371 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
372 SkippedDelegatedFrames);
373 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange);
374 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
375 DiscardDelegatedFrames);
376 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
377 DiscardDelegatedFramesWithLocking);
378 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SoftwareDPIChange);
379 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
380 UpdateCursorIfOverSelf);
381 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraCopyRequestTest,
382 DestroyedAfterCopyRequest);
383 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
384 VisibleViewportTest);
385 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
386 OverscrollResetsOnBlur);
387 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
388 FinishCompositionByMouse);
389 FRIEND_TEST_ALL_PREFIXES(WebContentsViewAuraTest,
390 WebContentsViewReparent);
392 class WindowObserver;
393 friend class WindowObserver;
395 void UpdateCursorIfOverSelf();
397 // Tracks whether SnapToPhysicalPixelBoundary() has been called.
398 bool has_snapped_to_boundary() { return has_snapped_to_boundary_; }
399 void ResetHasSnappedToBoundary() { has_snapped_to_boundary_ = false; }
401 // Set the bounds of the window and handle size changes. Assumes the caller
402 // has already adjusted the origin of |rect| to conform to whatever coordinate
403 // space is required by the aura::Window.
404 void InternalSetBounds(const gfx::Rect& rect);
407 bool UsesNativeWindowFrame() const;
410 ui::InputMethod* GetInputMethod() const;
412 // Sends shutdown request.
415 // Returns whether the widget needs an input grab to work properly.
416 bool NeedsInputGrab();
418 // Returns whether the widget needs to grab mouse capture to work properly.
419 bool NeedsMouseCapture();
421 // Confirm existing composition text in the webpage and ask the input method
422 // to cancel its ongoing composition session.
423 void FinishImeCompositionSession();
425 // This method computes movementX/Y and keeps track of mouse location for
426 // mouse lock on all mouse move events.
427 void ModifyEventMovementAndCoords(blink::WebMouseEvent* event);
429 // Sends an IPC to the renderer process to communicate whether or not
430 // the mouse cursor is visible anywhere on the screen.
431 void NotifyRendererOfCursorVisibilityState(bool is_visible);
433 // If |clip| is non-empty and and doesn't contain |rect| or |clip| is empty
434 // SchedulePaint() is invoked for |rect|.
435 void SchedulePaintIfNotInClip(const gfx::Rect& rect, const gfx::Rect& clip);
437 // Helper method to determine if, in mouse locked mode, the cursor should be
439 bool ShouldMoveToCenter();
441 // Called after |window_| is parented to a WindowEventDispatcher.
442 void AddedToRootWindow();
444 // Called prior to removing |window_| from a WindowEventDispatcher.
445 void RemovingFromRootWindow();
447 // DelegatedFrameHostClient implementation.
448 ui::Compositor* GetCompositor() const override;
449 ui::Layer* GetLayer() override;
450 RenderWidgetHostImpl* GetHost() override;
451 bool IsVisible() override;
452 scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock) override;
453 gfx::Size DesiredFrameSize() override;
454 float CurrentDeviceScaleFactor() override;
455 gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) override;
457 // Detaches |this| from the input method object.
458 void DetachFromInputMethod();
460 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method
461 // calls our keybindings handler against the event and send matched
462 // edit commands to renderer instead.
463 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event);
465 // Dismisses a Web Popup on a mouse or touch press outside the popup and its
467 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event);
469 // Converts |rect| from window coordinate to screen coordinate.
470 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const;
472 // Converts |rect| from screen coordinate to window coordinate.
473 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const;
475 // Helper function to set keyboard focus to the main window.
476 void SetKeyboardFocus();
478 RenderFrameHostImpl* GetFocusedFrame();
481 RenderWidgetHostImpl* host_;
483 aura::Window* window_;
485 scoped_ptr<DelegatedFrameHost> delegated_frame_host_;
487 scoped_ptr<WindowObserver> window_observer_;
489 // Are we in the process of closing? Tracked so fullscreen views can avoid
490 // sending a second shutdown request to the host when they lose the focus
491 // after requesting shutdown for another reason (e.g. Escape key).
494 // True if in the process of handling a window bounds changed notification.
495 bool in_bounds_changed_;
497 // Is this a fullscreen view?
500 // Our parent host view, if this is a popup. NULL otherwise.
501 RenderWidgetHostViewAura* popup_parent_host_view_;
503 // Our child popup host. NULL if we do not have a child popup.
504 RenderWidgetHostViewAura* popup_child_host_view_;
506 class EventFilterForPopupExit;
507 friend class EventFilterForPopupExit;
508 scoped_ptr<ui::EventHandler> event_filter_for_popup_exit_;
510 // True when content is being loaded. Used to show an hourglass cursor.
513 // The cursor for the page. This is passed up from the renderer.
514 WebCursor current_cursor_;
516 // The touch-event. Its touch-points are updated as necessary. A new
517 // touch-point is added from an ET_TOUCH_PRESSED event, and a touch-point is
518 // removed from the list on an ET_TOUCH_RELEASED event.
519 blink::WebTouchEvent touch_event_;
521 // The current text input type.
522 ui::TextInputType text_input_type_;
523 // The current text input mode corresponding to HTML5 inputmode attribute.
524 ui::TextInputMode text_input_mode_;
525 // The current text input flags.
526 int text_input_flags_;
527 bool can_compose_inline_;
529 // Rectangles for the selection anchor and focus.
530 gfx::Rect selection_anchor_rect_;
531 gfx::Rect selection_focus_rect_;
533 // The current composition character bounds.
534 std::vector<gfx::Rect> composition_character_bounds_;
536 // Indicates if there is onging composition text.
537 bool has_composition_text_;
539 // Whether return characters should be passed on to the RenderWidgetHostImpl.
540 bool accept_return_character_;
542 // Current tooltip text.
543 base::string16 tooltip_;
545 // The size and scale of the last software compositing frame that was swapped.
546 gfx::Size last_swapped_software_frame_size_;
547 float last_swapped_software_frame_scale_factor_;
549 // If non-NULL we're in OnPaint() and this is the supplied canvas.
550 gfx::Canvas* paint_canvas_;
552 // Used to record the last position of the mouse.
553 // While the mouse is locked, they store the last known position just as mouse
555 // Relative to the upper-left corner of the view.
556 gfx::Point unlocked_mouse_position_;
557 // Relative to the upper-left corner of the screen.
558 gfx::Point unlocked_global_mouse_position_;
559 // Last cursor position relative to screen. Used to compute movementX/Y.
560 gfx::Point global_mouse_position_;
561 // In mouse locked mode, we synthetically move the mouse cursor to the center
562 // of the window when it reaches the window borders to avoid it going outside.
563 // This flag is used to differentiate between these synthetic mouse move
564 // events vs. normal mouse move events.
565 bool synthetic_move_sent_;
567 // Used to track the state of the window we're created from. Only used when
568 // created fullscreen.
569 scoped_ptr<aura::WindowTracker> host_tracker_;
571 // Used to track the last cursor visibility update that was sent to the
572 // renderer via NotifyRendererOfCursorVisibilityState().
573 enum CursorVisibilityState {
578 CursorVisibilityState cursor_visibility_state_in_renderer_;
581 // The list of rectangles from constrained windows over this view. Windowed
582 // NPAPI plugins shouldn't draw over them.
583 std::vector<gfx::Rect> constrained_rects_;
585 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves;
586 // Contains information about each windowed plugin's clip and cutout rects (
587 // from the renderer). This is needed because when the transient windows
588 // over this view changes, we need this information in order to create a new
589 // region for the HWND.
590 PluginWindowMoves plugin_window_moves_;
592 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used
593 // for accessibility, as the container for windowless plugins like
594 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads,
596 content::LegacyRenderWidgetHostHWND* legacy_render_widget_host_HWND_;
599 bool has_snapped_to_boundary_;
601 TouchEditingClient* touch_editing_client_;
603 scoped_ptr<OverscrollController> overscroll_controller_;
605 // The last scroll offset of the view.
606 gfx::Vector2dF last_scroll_offset_;
610 std::vector<ui::LatencyInfo> software_latency_info_;
612 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_;
614 // True when this view acts as a platform view hack for a
615 // RenderWidgetHostViewGuest.
616 bool is_guest_view_hack_;
618 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
620 gfx::Rect disambiguation_target_rect_;
622 // The last scroll offset when we start to render the link disambiguation
623 // view, so we can ensure the window hasn't moved between copying from the
624 // compositing surface and showing the disambiguation popup.
625 gfx::Vector2dF disambiguation_scroll_offset_;
627 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
630 } // namespace content
632 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_