| Index: content/browser/renderer_host/render_widget_host_view_aura.h
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
|
| index c814c97fa78df1eef94cb867b73701c8bcb386e9..3df235259fe87ef4ee17532b4b9e972a0861e495 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura.h
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.h
|
| @@ -138,99 +138,92 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
|
| RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack);
|
|
|
| // RenderWidgetHostView implementation.
|
| - virtual bool OnMessageReceived(const IPC::Message& msg) override;
|
| - virtual void InitAsChild(gfx::NativeView parent_view) override;
|
| - virtual RenderWidgetHost* GetRenderWidgetHost() const override;
|
| - virtual void SetSize(const gfx::Size& size) override;
|
| - virtual void SetBounds(const gfx::Rect& rect) override;
|
| - virtual gfx::Vector2dF GetLastScrollOffset() const override;
|
| - virtual gfx::NativeView GetNativeView() const override;
|
| - virtual gfx::NativeViewId GetNativeViewId() const override;
|
| - virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
|
| - virtual ui::TextInputClient* GetTextInputClient() override;
|
| - virtual bool HasFocus() const override;
|
| - virtual bool IsSurfaceAvailableForCopy() const override;
|
| - virtual void Show() override;
|
| - virtual void Hide() override;
|
| - virtual bool IsShowing() override;
|
| - virtual gfx::Rect GetViewBounds() const override;
|
| - virtual void SetBackgroundColor(SkColor color) override;
|
| - virtual gfx::Size GetVisibleViewportSize() const override;
|
| - virtual void SetInsets(const gfx::Insets& insets) override;
|
| + bool OnMessageReceived(const IPC::Message& msg) override;
|
| + void InitAsChild(gfx::NativeView parent_view) override;
|
| + RenderWidgetHost* GetRenderWidgetHost() const override;
|
| + void SetSize(const gfx::Size& size) override;
|
| + void SetBounds(const gfx::Rect& rect) override;
|
| + gfx::Vector2dF GetLastScrollOffset() const override;
|
| + gfx::NativeView GetNativeView() const override;
|
| + gfx::NativeViewId GetNativeViewId() const override;
|
| + gfx::NativeViewAccessible GetNativeViewAccessible() override;
|
| + ui::TextInputClient* GetTextInputClient() override;
|
| + bool HasFocus() const override;
|
| + bool IsSurfaceAvailableForCopy() const override;
|
| + void Show() override;
|
| + void Hide() override;
|
| + bool IsShowing() override;
|
| + gfx::Rect GetViewBounds() const override;
|
| + void SetBackgroundColor(SkColor color) override;
|
| + gfx::Size GetVisibleViewportSize() const override;
|
| + void SetInsets(const gfx::Insets& insets) override;
|
|
|
| // Overridden from RenderWidgetHostViewBase:
|
| - virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
|
| - const gfx::Rect& pos) override;
|
| - virtual void InitAsFullscreen(
|
| - RenderWidgetHostView* reference_host_view) override;
|
| - virtual void WasShown() override;
|
| - virtual void WasHidden() override;
|
| - virtual void MovePluginWindows(
|
| - const std::vector<WebPluginGeometry>& moves) override;
|
| - virtual void Focus() override;
|
| - virtual void Blur() override;
|
| - virtual void UpdateCursor(const WebCursor& cursor) override;
|
| - virtual void SetIsLoading(bool is_loading) override;
|
| - virtual void TextInputTypeChanged(ui::TextInputType type,
|
| - ui::TextInputMode input_mode,
|
| - bool can_compose_inline,
|
| - int flags) override;
|
| - virtual void ImeCancelComposition() override;
|
| - virtual void ImeCompositionRangeChanged(
|
| + void InitAsPopup(RenderWidgetHostView* parent_host_view,
|
| + const gfx::Rect& pos) override;
|
| + void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
|
| + void WasShown() override;
|
| + void WasHidden() override;
|
| + void MovePluginWindows(const std::vector<WebPluginGeometry>& moves) override;
|
| + void Focus() override;
|
| + void Blur() override;
|
| + void UpdateCursor(const WebCursor& cursor) override;
|
| + void SetIsLoading(bool is_loading) override;
|
| + void TextInputTypeChanged(ui::TextInputType type,
|
| + ui::TextInputMode input_mode,
|
| + bool can_compose_inline,
|
| + int flags) override;
|
| + void ImeCancelComposition() override;
|
| + void ImeCompositionRangeChanged(
|
| const gfx::Range& range,
|
| const std::vector<gfx::Rect>& character_bounds) override;
|
| - virtual void RenderProcessGone(base::TerminationStatus status,
|
| - int error_code) override;
|
| - virtual void Destroy() override;
|
| - virtual void SetTooltipText(const base::string16& tooltip_text) override;
|
| - virtual void SelectionChanged(const base::string16& text,
|
| - size_t offset,
|
| - const gfx::Range& range) override;
|
| - virtual gfx::Size GetRequestedRendererSize() const override;
|
| - virtual void SelectionBoundsChanged(
|
| + void RenderProcessGone(base::TerminationStatus status,
|
| + int error_code) override;
|
| + void Destroy() override;
|
| + void SetTooltipText(const base::string16& tooltip_text) override;
|
| + void SelectionChanged(const base::string16& text,
|
| + size_t offset,
|
| + const gfx::Range& range) override;
|
| + gfx::Size GetRequestedRendererSize() const override;
|
| + void SelectionBoundsChanged(
|
| const ViewHostMsg_SelectionBounds_Params& params) override;
|
| - virtual void CopyFromCompositingSurface(
|
| - const gfx::Rect& src_subrect,
|
| - const gfx::Size& dst_size,
|
| - CopyFromCompositingSurfaceCallback& callback,
|
| - const SkColorType color_type) override;
|
| - virtual void CopyFromCompositingSurfaceToVideoFrame(
|
| + void CopyFromCompositingSurface(const gfx::Rect& src_subrect,
|
| + const gfx::Size& dst_size,
|
| + CopyFromCompositingSurfaceCallback& callback,
|
| + const SkColorType color_type) override;
|
| + void CopyFromCompositingSurfaceToVideoFrame(
|
| const gfx::Rect& src_subrect,
|
| const scoped_refptr<media::VideoFrame>& target,
|
| const base::Callback<void(bool)>& callback) override;
|
| - virtual bool CanCopyToVideoFrame() const override;
|
| - virtual bool CanSubscribeFrame() const override;
|
| - virtual void BeginFrameSubscription(
|
| + bool CanCopyToVideoFrame() const override;
|
| + bool CanSubscribeFrame() const override;
|
| + void BeginFrameSubscription(
|
| scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
|
| - virtual void EndFrameSubscription() override;
|
| - virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
|
| - virtual void GetScreenInfo(blink::WebScreenInfo* results) override;
|
| - virtual gfx::Rect GetBoundsInRootWindow() override;
|
| - virtual void WheelEventAck(const blink::WebMouseWheelEvent& event,
|
| - InputEventAckState ack_result) override;
|
| - virtual void GestureEventAck(const blink::WebGestureEvent& event,
|
| - InputEventAckState ack_result) override;
|
| - virtual void ProcessAckedTouchEvent(
|
| - const TouchEventWithLatencyInfo& touch,
|
| - InputEventAckState ack_result) override;
|
| - virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
|
| - override;
|
| - virtual InputEventAckState FilterInputEvent(
|
| + void EndFrameSubscription() override;
|
| + bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
|
| + void GetScreenInfo(blink::WebScreenInfo* results) override;
|
| + gfx::Rect GetBoundsInRootWindow() override;
|
| + void WheelEventAck(const blink::WebMouseWheelEvent& event,
|
| + InputEventAckState ack_result) override;
|
| + void GestureEventAck(const blink::WebGestureEvent& event,
|
| + InputEventAckState ack_result) override;
|
| + void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
|
| + InputEventAckState ack_result) override;
|
| + scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() override;
|
| + InputEventAckState FilterInputEvent(
|
| const blink::WebInputEvent& input_event) override;
|
| - virtual gfx::GLSurfaceHandle GetCompositingSurface() override;
|
| - virtual BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
|
| + gfx::GLSurfaceHandle GetCompositingSurface() override;
|
| + BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
|
| BrowserAccessibilityDelegate* delegate) override;
|
| - virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override;
|
| - virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible()
|
| - override;
|
| - virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
|
| - const SkBitmap& zoomed_bitmap) override;
|
| - virtual bool LockMouse() override;
|
| - virtual void UnlockMouse() override;
|
| - virtual void OnSwapCompositorFrame(
|
| - uint32 output_surface_id,
|
| - scoped_ptr<cc::CompositorFrame> frame) override;
|
| - virtual void DidStopFlinging() override;
|
| + gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override;
|
| + gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override;
|
| + void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
|
| + const SkBitmap& zoomed_bitmap) override;
|
| + bool LockMouse() override;
|
| + void UnlockMouse() override;
|
| + void OnSwapCompositorFrame(uint32 output_surface_id,
|
| + scoped_ptr<cc::CompositorFrame> frame) override;
|
| + void DidStopFlinging() override;
|
|
|
| #if defined(OS_WIN)
|
| virtual void SetParentNativeViewAccessible(
|
| @@ -239,89 +232,88 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
|
| #endif
|
|
|
| // Overridden from ui::TextInputClient:
|
| - virtual void SetCompositionText(
|
| - const ui::CompositionText& composition) override;
|
| - virtual void ConfirmCompositionText() override;
|
| - virtual void ClearCompositionText() override;
|
| - virtual void InsertText(const base::string16& text) override;
|
| - virtual void InsertChar(base::char16 ch, int flags) override;
|
| - virtual gfx::NativeWindow GetAttachedWindow() const override;
|
| - virtual ui::TextInputType GetTextInputType() const override;
|
| - virtual ui::TextInputMode GetTextInputMode() const override;
|
| - virtual int GetTextInputFlags() const override;
|
| - virtual bool CanComposeInline() const override;
|
| - virtual gfx::Rect GetCaretBounds() const override;
|
| - virtual bool GetCompositionCharacterBounds(uint32 index,
|
| - gfx::Rect* rect) const override;
|
| - virtual bool HasCompositionText() const override;
|
| - virtual bool GetTextRange(gfx::Range* range) const override;
|
| - virtual bool GetCompositionTextRange(gfx::Range* range) const override;
|
| - virtual bool GetSelectionRange(gfx::Range* range) const override;
|
| - virtual bool SetSelectionRange(const gfx::Range& range) override;
|
| - virtual bool DeleteRange(const gfx::Range& range) override;
|
| - virtual bool GetTextFromRange(const gfx::Range& range,
|
| - base::string16* text) const override;
|
| - virtual void OnInputMethodChanged() override;
|
| - virtual bool ChangeTextDirectionAndLayoutAlignment(
|
| + void SetCompositionText(const ui::CompositionText& composition) override;
|
| + void ConfirmCompositionText() override;
|
| + void ClearCompositionText() override;
|
| + void InsertText(const base::string16& text) override;
|
| + void InsertChar(base::char16 ch, int flags) override;
|
| + gfx::NativeWindow GetAttachedWindow() const override;
|
| + ui::TextInputType GetTextInputType() const override;
|
| + ui::TextInputMode GetTextInputMode() const override;
|
| + int GetTextInputFlags() const override;
|
| + bool CanComposeInline() const override;
|
| + gfx::Rect GetCaretBounds() const override;
|
| + bool GetCompositionCharacterBounds(uint32 index,
|
| + gfx::Rect* rect) const override;
|
| + bool HasCompositionText() const override;
|
| + bool GetTextRange(gfx::Range* range) const override;
|
| + bool GetCompositionTextRange(gfx::Range* range) const override;
|
| + bool GetSelectionRange(gfx::Range* range) const override;
|
| + bool SetSelectionRange(const gfx::Range& range) override;
|
| + bool DeleteRange(const gfx::Range& range) override;
|
| + bool GetTextFromRange(const gfx::Range& range,
|
| + base::string16* text) const override;
|
| + void OnInputMethodChanged() override;
|
| + bool ChangeTextDirectionAndLayoutAlignment(
|
| base::i18n::TextDirection direction) override;
|
| - virtual void ExtendSelectionAndDelete(size_t before, size_t after) override;
|
| - virtual void EnsureCaretInRect(const gfx::Rect& rect) override;
|
| - virtual void OnCandidateWindowShown() override;
|
| - virtual void OnCandidateWindowUpdated() override;
|
| - virtual void OnCandidateWindowHidden() override;
|
| - virtual bool IsEditingCommandEnabled(int command_id) override;
|
| - virtual void ExecuteEditingCommand(int command_id) override;
|
| + void ExtendSelectionAndDelete(size_t before, size_t after) override;
|
| + void EnsureCaretInRect(const gfx::Rect& rect) override;
|
| + void OnCandidateWindowShown() override;
|
| + void OnCandidateWindowUpdated() override;
|
| + void OnCandidateWindowHidden() override;
|
| + bool IsEditingCommandEnabled(int command_id) override;
|
| + void ExecuteEditingCommand(int command_id) override;
|
|
|
| // Overridden from gfx::DisplayObserver:
|
| - virtual void OnDisplayAdded(const gfx::Display& new_display) override;
|
| - virtual void OnDisplayRemoved(const gfx::Display& old_display) override;
|
| - virtual void OnDisplayMetricsChanged(const gfx::Display& display,
|
| - uint32_t metrics) override;
|
| + void OnDisplayAdded(const gfx::Display& new_display) override;
|
| + void OnDisplayRemoved(const gfx::Display& old_display) override;
|
| + void OnDisplayMetricsChanged(const gfx::Display& display,
|
| + uint32_t metrics) override;
|
|
|
| // Overridden from aura::WindowDelegate:
|
| - virtual gfx::Size GetMinimumSize() const override;
|
| - virtual gfx::Size GetMaximumSize() const override;
|
| - virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
|
| - const gfx::Rect& new_bounds) override;
|
| - virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override;
|
| - virtual int GetNonClientComponent(const gfx::Point& point) const override;
|
| - virtual bool ShouldDescendIntoChildForEventHandling(
|
| + gfx::Size GetMinimumSize() const override;
|
| + gfx::Size GetMaximumSize() const override;
|
| + void OnBoundsChanged(const gfx::Rect& old_bounds,
|
| + const gfx::Rect& new_bounds) override;
|
| + gfx::NativeCursor GetCursor(const gfx::Point& point) override;
|
| + int GetNonClientComponent(const gfx::Point& point) const override;
|
| + bool ShouldDescendIntoChildForEventHandling(
|
| aura::Window* child,
|
| const gfx::Point& location) override;
|
| - virtual bool CanFocus() override;
|
| - virtual void OnCaptureLost() override;
|
| - virtual void OnPaint(gfx::Canvas* canvas) override;
|
| - virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
|
| - virtual void OnWindowDestroying(aura::Window* window) override;
|
| - virtual void OnWindowDestroyed(aura::Window* window) override;
|
| - virtual void OnWindowTargetVisibilityChanged(bool visible) override;
|
| - virtual bool HasHitTestMask() const override;
|
| - virtual void GetHitTestMask(gfx::Path* mask) const override;
|
| + bool CanFocus() override;
|
| + void OnCaptureLost() override;
|
| + void OnPaint(gfx::Canvas* canvas) override;
|
| + void OnDeviceScaleFactorChanged(float device_scale_factor) override;
|
| + void OnWindowDestroying(aura::Window* window) override;
|
| + void OnWindowDestroyed(aura::Window* window) override;
|
| + void OnWindowTargetVisibilityChanged(bool visible) override;
|
| + bool HasHitTestMask() const override;
|
| + void GetHitTestMask(gfx::Path* mask) const override;
|
|
|
| // Overridden from ui::EventHandler:
|
| - virtual void OnKeyEvent(ui::KeyEvent* event) override;
|
| - virtual void OnMouseEvent(ui::MouseEvent* event) override;
|
| - virtual void OnScrollEvent(ui::ScrollEvent* event) override;
|
| - virtual void OnTouchEvent(ui::TouchEvent* event) override;
|
| - virtual void OnGestureEvent(ui::GestureEvent* event) override;
|
| + void OnKeyEvent(ui::KeyEvent* event) override;
|
| + void OnMouseEvent(ui::MouseEvent* event) override;
|
| + void OnScrollEvent(ui::ScrollEvent* event) override;
|
| + void OnTouchEvent(ui::TouchEvent* event) override;
|
| + void OnGestureEvent(ui::GestureEvent* event) override;
|
|
|
| // Overridden from aura::client::ActivationDelegate:
|
| - virtual bool ShouldActivate() const override;
|
| + bool ShouldActivate() const override;
|
|
|
| // Overridden from aura::client::ActivationChangeObserver:
|
| - virtual void OnWindowActivated(aura::Window* gained_activation,
|
| - aura::Window* lost_activation) override;
|
| + void OnWindowActivated(aura::Window* gained_activation,
|
| + aura::Window* lost_activation) override;
|
|
|
| // Overridden from aura::client::CursorClientObserver:
|
| - virtual void OnCursorVisibilityChanged(bool is_visible) override;
|
| + void OnCursorVisibilityChanged(bool is_visible) override;
|
|
|
| // Overridden from aura::client::FocusChangeObserver:
|
| - virtual void OnWindowFocused(aura::Window* gained_focus,
|
| - aura::Window* lost_focus) override;
|
| + void OnWindowFocused(aura::Window* gained_focus,
|
| + aura::Window* lost_focus) override;
|
|
|
| // Overridden from aura::WindowTreeHostObserver:
|
| - virtual void OnHostMoved(const aura::WindowTreeHost* host,
|
| - const gfx::Point& new_origin) override;
|
| + void OnHostMoved(const aura::WindowTreeHost* host,
|
| + const gfx::Point& new_origin) override;
|
|
|
| void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params);
|
|
|
| @@ -361,12 +353,12 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
|
| }
|
|
|
| protected:
|
| - virtual ~RenderWidgetHostViewAura();
|
| + ~RenderWidgetHostViewAura() override;
|
|
|
| // Exposed for tests.
|
| aura::Window* window() { return window_; }
|
| - virtual SkColorType PreferredReadbackFormat() override;
|
| - virtual DelegatedFrameHost* GetDelegatedFrameHost() const override;
|
| + SkColorType PreferredReadbackFormat() override;
|
| + DelegatedFrameHost* GetDelegatedFrameHost() const override;
|
|
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
|
| @@ -451,15 +443,14 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
|
| void RemovingFromRootWindow();
|
|
|
| // DelegatedFrameHostClient implementation.
|
| - virtual ui::Compositor* GetCompositor() const override;
|
| - virtual ui::Layer* GetLayer() override;
|
| - virtual RenderWidgetHostImpl* GetHost() override;
|
| - virtual bool IsVisible() override;
|
| - virtual scoped_ptr<ResizeLock> CreateResizeLock(
|
| - bool defer_compositor_lock) override;
|
| - virtual gfx::Size DesiredFrameSize() override;
|
| - virtual float CurrentDeviceScaleFactor() override;
|
| - virtual gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) override;
|
| + ui::Compositor* GetCompositor() const override;
|
| + ui::Layer* GetLayer() override;
|
| + RenderWidgetHostImpl* GetHost() override;
|
| + bool IsVisible() override;
|
| + scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock) override;
|
| + gfx::Size DesiredFrameSize() override;
|
| + float CurrentDeviceScaleFactor() override;
|
| + gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) override;
|
|
|
| // Detaches |this| from the input method object.
|
| void DetachFromInputMethod();
|
|
|