| OLD | NEW |
| 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_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 // Changes the brightness of the layer depending on the amount of horizontal | 97 // Changes the brightness of the layer depending on the amount of horizontal |
| 98 // overscroll (|delta_x|, in pixels). | 98 // overscroll (|delta_x|, in pixels). |
| 99 void UpdateOverscrollWindowBrightness(float delta_x); | 99 void UpdateOverscrollWindowBrightness(float delta_x); |
| 100 | 100 |
| 101 void AttachTouchEditableToRenderView(); | 101 void AttachTouchEditableToRenderView(); |
| 102 | 102 |
| 103 void OverscrollUpdateForWebContentsDelegate(int delta_y); | 103 void OverscrollUpdateForWebContentsDelegate(int delta_y); |
| 104 | 104 |
| 105 // Overridden from WebContentsView: | 105 // Overridden from WebContentsView: |
| 106 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 106 virtual gfx::NativeView GetNativeView() const override; |
| 107 virtual gfx::NativeView GetContentNativeView() const OVERRIDE; | 107 virtual gfx::NativeView GetContentNativeView() const override; |
| 108 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; | 108 virtual gfx::NativeWindow GetTopLevelNativeWindow() const override; |
| 109 virtual void GetContainerBounds(gfx::Rect *out) const OVERRIDE; | 109 virtual void GetContainerBounds(gfx::Rect *out) const override; |
| 110 virtual void SizeContents(const gfx::Size& size) OVERRIDE; | 110 virtual void SizeContents(const gfx::Size& size) override; |
| 111 virtual void Focus() OVERRIDE; | 111 virtual void Focus() override; |
| 112 virtual void SetInitialFocus() OVERRIDE; | 112 virtual void SetInitialFocus() override; |
| 113 virtual void StoreFocus() OVERRIDE; | 113 virtual void StoreFocus() override; |
| 114 virtual void RestoreFocus() OVERRIDE; | 114 virtual void RestoreFocus() override; |
| 115 virtual DropData* GetDropData() const OVERRIDE; | 115 virtual DropData* GetDropData() const override; |
| 116 virtual gfx::Rect GetViewBounds() const OVERRIDE; | 116 virtual gfx::Rect GetViewBounds() const override; |
| 117 virtual void CreateView( | 117 virtual void CreateView( |
| 118 const gfx::Size& initial_size, gfx::NativeView context) OVERRIDE; | 118 const gfx::Size& initial_size, gfx::NativeView context) override; |
| 119 virtual RenderWidgetHostViewBase* CreateViewForWidget( | 119 virtual RenderWidgetHostViewBase* CreateViewForWidget( |
| 120 RenderWidgetHost* render_widget_host) OVERRIDE; | 120 RenderWidgetHost* render_widget_host) override; |
| 121 virtual RenderWidgetHostViewBase* CreateViewForPopupWidget( | 121 virtual RenderWidgetHostViewBase* CreateViewForPopupWidget( |
| 122 RenderWidgetHost* render_widget_host) OVERRIDE; | 122 RenderWidgetHost* render_widget_host) override; |
| 123 virtual void SetPageTitle(const base::string16& title) OVERRIDE; | 123 virtual void SetPageTitle(const base::string16& title) override; |
| 124 virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; | 124 virtual void RenderViewCreated(RenderViewHost* host) override; |
| 125 virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; | 125 virtual void RenderViewSwappedIn(RenderViewHost* host) override; |
| 126 virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; | 126 virtual void SetOverscrollControllerEnabled(bool enabled) override; |
| 127 | 127 |
| 128 // Overridden from RenderViewHostDelegateView: | 128 // Overridden from RenderViewHostDelegateView: |
| 129 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, | 129 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, |
| 130 const ContextMenuParams& params) OVERRIDE; | 130 const ContextMenuParams& params) override; |
| 131 virtual void StartDragging(const DropData& drop_data, | 131 virtual void StartDragging(const DropData& drop_data, |
| 132 blink::WebDragOperationsMask operations, | 132 blink::WebDragOperationsMask operations, |
| 133 const gfx::ImageSkia& image, | 133 const gfx::ImageSkia& image, |
| 134 const gfx::Vector2d& image_offset, | 134 const gfx::Vector2d& image_offset, |
| 135 const DragEventSourceInfo& event_info) OVERRIDE; | 135 const DragEventSourceInfo& event_info) override; |
| 136 virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; | 136 virtual void UpdateDragCursor(blink::WebDragOperation operation) override; |
| 137 virtual void GotFocus() OVERRIDE; | 137 virtual void GotFocus() override; |
| 138 virtual void TakeFocus(bool reverse) OVERRIDE; | 138 virtual void TakeFocus(bool reverse) override; |
| 139 virtual void ShowDisambiguationPopup( | 139 virtual void ShowDisambiguationPopup( |
| 140 const gfx::Rect& target_rect, | 140 const gfx::Rect& target_rect, |
| 141 const SkBitmap& zoomed_bitmap, | 141 const SkBitmap& zoomed_bitmap, |
| 142 const base::Callback<void(ui::GestureEvent*)>& gesture_cb, | 142 const base::Callback<void(ui::GestureEvent*)>& gesture_cb, |
| 143 const base::Callback<void(ui::MouseEvent*)>& mouse_cb) OVERRIDE; | 143 const base::Callback<void(ui::MouseEvent*)>& mouse_cb) override; |
| 144 virtual void HideDisambiguationPopup() OVERRIDE; | 144 virtual void HideDisambiguationPopup() override; |
| 145 | 145 |
| 146 // Overridden from OverscrollControllerDelegate: | 146 // Overridden from OverscrollControllerDelegate: |
| 147 virtual gfx::Rect GetVisibleBounds() const OVERRIDE; | 147 virtual gfx::Rect GetVisibleBounds() const override; |
| 148 virtual bool OnOverscrollUpdate(float delta_x, float delta_y) OVERRIDE; | 148 virtual bool OnOverscrollUpdate(float delta_x, float delta_y) override; |
| 149 virtual void OnOverscrollComplete(OverscrollMode overscroll_mode) OVERRIDE; | 149 virtual void OnOverscrollComplete(OverscrollMode overscroll_mode) override; |
| 150 virtual void OnOverscrollModeChange(OverscrollMode old_mode, | 150 virtual void OnOverscrollModeChange(OverscrollMode old_mode, |
| 151 OverscrollMode new_mode) OVERRIDE; | 151 OverscrollMode new_mode) override; |
| 152 | 152 |
| 153 // Overridden from ui::ImplicitAnimationObserver: | 153 // Overridden from ui::ImplicitAnimationObserver: |
| 154 virtual void OnImplicitAnimationsCompleted() OVERRIDE; | 154 virtual void OnImplicitAnimationsCompleted() override; |
| 155 | 155 |
| 156 // Overridden from aura::WindowDelegate: | 156 // Overridden from aura::WindowDelegate: |
| 157 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 157 virtual gfx::Size GetMinimumSize() const override; |
| 158 virtual gfx::Size GetMaximumSize() const OVERRIDE; | 158 virtual gfx::Size GetMaximumSize() const override; |
| 159 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 159 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 160 const gfx::Rect& new_bounds) OVERRIDE; | 160 const gfx::Rect& new_bounds) override; |
| 161 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; | 161 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override; |
| 162 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; | 162 virtual int GetNonClientComponent(const gfx::Point& point) const override; |
| 163 virtual bool ShouldDescendIntoChildForEventHandling( | 163 virtual bool ShouldDescendIntoChildForEventHandling( |
| 164 aura::Window* child, | 164 aura::Window* child, |
| 165 const gfx::Point& location) OVERRIDE; | 165 const gfx::Point& location) override; |
| 166 virtual bool CanFocus() OVERRIDE; | 166 virtual bool CanFocus() override; |
| 167 virtual void OnCaptureLost() OVERRIDE; | 167 virtual void OnCaptureLost() override; |
| 168 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 168 virtual void OnPaint(gfx::Canvas* canvas) override; |
| 169 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 169 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
| 170 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 170 virtual void OnWindowDestroying(aura::Window* window) override; |
| 171 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; | 171 virtual void OnWindowDestroyed(aura::Window* window) override; |
| 172 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE; | 172 virtual void OnWindowTargetVisibilityChanged(bool visible) override; |
| 173 virtual bool HasHitTestMask() const OVERRIDE; | 173 virtual bool HasHitTestMask() const override; |
| 174 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; | 174 virtual void GetHitTestMask(gfx::Path* mask) const override; |
| 175 | 175 |
| 176 // Overridden from ui::EventHandler: | 176 // Overridden from ui::EventHandler: |
| 177 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 177 virtual void OnKeyEvent(ui::KeyEvent* event) override; |
| 178 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 178 virtual void OnMouseEvent(ui::MouseEvent* event) override; |
| 179 | 179 |
| 180 // Overridden from aura::client::DragDropDelegate: | 180 // Overridden from aura::client::DragDropDelegate: |
| 181 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; | 181 virtual void OnDragEntered(const ui::DropTargetEvent& event) override; |
| 182 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; | 182 virtual int OnDragUpdated(const ui::DropTargetEvent& event) override; |
| 183 virtual void OnDragExited() OVERRIDE; | 183 virtual void OnDragExited() override; |
| 184 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; | 184 virtual int OnPerformDrop(const ui::DropTargetEvent& event) override; |
| 185 | 185 |
| 186 // Overridden from aura::WindowObserver: | 186 // Overridden from aura::WindowObserver: |
| 187 virtual void OnWindowVisibilityChanged(aura::Window* window, | 187 virtual void OnWindowVisibilityChanged(aura::Window* window, |
| 188 bool visible) OVERRIDE; | 188 bool visible) override; |
| 189 | 189 |
| 190 // Update the web contents visiblity. | 190 // Update the web contents visiblity. |
| 191 void UpdateWebContentsVisibility(bool visible); | 191 void UpdateWebContentsVisibility(bool visible); |
| 192 | 192 |
| 193 scoped_ptr<aura::Window> window_; | 193 scoped_ptr<aura::Window> window_; |
| 194 | 194 |
| 195 // The window that shows the screenshot of the history page during an | 195 // The window that shows the screenshot of the history page during an |
| 196 // overscroll navigation gesture. | 196 // overscroll navigation gesture. |
| 197 scoped_ptr<aura::Window> overscroll_window_; | 197 scoped_ptr<aura::Window> overscroll_window_; |
| 198 | 198 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 // On Windows we can run into problems if resources get released within the | 236 // On Windows we can run into problems if resources get released within the |
| 237 // initialization phase while the content (and its dimensions) are not known. | 237 // initialization phase while the content (and its dimensions) are not known. |
| 238 bool is_or_was_visible_; | 238 bool is_or_was_visible_; |
| 239 | 239 |
| 240 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); | 240 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 } // namespace content | 243 } // namespace content |
| 244 | 244 |
| 245 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ | 245 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
| OLD | NEW |