OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_AURA_OVERSCROLL_NAVIGATION_OVERLAY_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_NAVIGATION_OVERLAY_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_NAVIGATION_OVERLAY_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_NAVIGATION_OVERLAY_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "content/browser/web_contents/aura/overscroll_window_animation.h" | 10 #include "content/browser/web_contents/aura/overscroll_window_animation.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 friend class OverscrollNavigationOverlayTest; | 51 friend class OverscrollNavigationOverlayTest; |
52 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, WithScreenshot); | 52 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, WithScreenshot); |
53 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, WithoutScreenshot); | 53 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, WithoutScreenshot); |
54 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, CannotNavigate); | 54 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, CannotNavigate); |
55 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, CancelNavigation); | 55 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, CancelNavigation); |
56 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, | 56 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, |
57 CancelAfterSuccessfulNavigation); | 57 CancelAfterSuccessfulNavigation); |
58 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, OverlayWindowSwap); | 58 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, OverlayWindowSwap); |
59 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, | 59 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, |
60 CloseDuringAnimation); | 60 CloseDuringAnimation); |
| 61 FRIEND_TEST_ALL_PREFIXES(OverscrollNavigationOverlayTest, |
| 62 ImmediateLoadOnNavigate); |
61 | 63 |
62 // Resets state and starts observing |web_contents_| for page load/paint | 64 // Resets state and starts observing |web_contents_| for page load/paint |
63 // updates. This function makes sure that the screenshot window is stacked | 65 // updates. This function makes sure that the screenshot window is stacked |
64 // on top, so that it hides the content window behind it, and destroys the | 66 // on top, so that it hides the content window behind it, and destroys the |
65 // screenshot window when the page is done loading/painting. | 67 // screenshot window when the page is done loading/painting. |
66 // This should be called immediately after initiating the navigation, | 68 // This should be called immediately after initiating the navigation, |
67 // otherwise the overlay may be dismissed prematurely. | 69 // otherwise the overlay may be dismissed prematurely. |
68 void StartObserving(); | 70 void StartObserving(); |
69 | 71 |
70 // Stop observing the page and start the final overlay fade-out animation if | 72 // Stop observing the page and start the final overlay fade-out animation if |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 118 |
117 // The window that hosts the web contents. | 119 // The window that hosts the web contents. |
118 aura::Window* web_contents_window_; | 120 aura::Window* web_contents_window_; |
119 | 121 |
120 DISALLOW_COPY_AND_ASSIGN(OverscrollNavigationOverlay); | 122 DISALLOW_COPY_AND_ASSIGN(OverscrollNavigationOverlay); |
121 }; | 123 }; |
122 | 124 |
123 } // namespace content | 125 } // namespace content |
124 | 126 |
125 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_NAVIGATION_OVERLAY_H_ | 127 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_NAVIGATION_OVERLAY_H_ |
OLD | NEW |