| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // animates in, or the content window animates out). | 81 // animates in, or the content window animates out). |
| 82 void CompleteOverscrollNavigation(OverscrollMode mode); | 82 void CompleteOverscrollNavigation(OverscrollMode mode); |
| 83 | 83 |
| 84 // Returns the window that should be animated for the overscroll gesture. | 84 // Returns the window that should be animated for the overscroll gesture. |
| 85 // (note that during the overscroll gesture, either the overlay window or the | 85 // (note that during the overscroll gesture, either the overlay window or the |
| 86 // content window can be animated). | 86 // content window can be animated). |
| 87 aura::Window* GetWindowToAnimateForOverscroll(); | 87 aura::Window* GetWindowToAnimateForOverscroll(); |
| 88 | 88 |
| 89 // Returns the amount the animating window should be translated in response to | 89 // Returns the amount the animating window should be translated in response to |
| 90 // the overscroll gesture. | 90 // the overscroll gesture. |
| 91 gfx::Vector2d GetTranslationForOverscroll(int delta_x, int delta_y); | 91 gfx::Vector2dF GetTranslationForOverscroll(float delta_x, float delta_y); |
| 92 | 92 |
| 93 // A window showing the screenshot is overlayed during a navigation triggered | 93 // A window showing the screenshot is overlayed during a navigation triggered |
| 94 // by overscroll. This function sets this up. | 94 // by overscroll. This function sets this up. |
| 95 void PrepareOverscrollNavigationOverlay(); | 95 void PrepareOverscrollNavigationOverlay(); |
| 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(float 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; |
| (...skipping 122 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 |