Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: content/browser/web_contents/aura/overscroll_navigation_overlay.cc

Issue 2983883002: Reset overscroll state when OverscrollWindowDelegate is destroyed.
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/web_contents/aura/overscroll_window_animation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h" 5 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 return; 244 return;
245 main_window->ReleaseCapture(); 245 main_window->ReleaseCapture();
246 } 246 }
247 247
248 void OverscrollNavigationOverlay::OnOverscrollCompleted( 248 void OverscrollNavigationOverlay::OnOverscrollCompleted(
249 std::unique_ptr<aura::Window> window) { 249 std::unique_ptr<aura::Window> window) {
250 DCHECK(direction_ != NONE); 250 DCHECK(direction_ != NONE);
251 aura::Window* main_window = GetMainWindow(); 251 aura::Window* main_window = GetMainWindow();
252 if (!main_window) { 252 if (!main_window) {
253 RecordCancelled(direction_, owa_->overscroll_source()); 253 RecordCancelled(direction_, owa_->overscroll_source());
254 direction_ = NONE;
254 return; 255 return;
255 } 256 }
256 257
257 main_window->SetTransform(gfx::Transform()); 258 main_window->SetTransform(gfx::Transform());
258 window_ = std::move(window); 259 window_ = std::move(window);
259 // Make sure the window is in its default position. 260 // Make sure the window is in its default position.
260 window_->SetBounds(gfx::Rect(web_contents_window_->bounds().size())); 261 window_->SetBounds(gfx::Rect(web_contents_window_->bounds().size()));
261 window_->SetTransform(gfx::Transform()); 262 window_->SetTransform(gfx::Transform());
262 // Make sure the overlay window is on top. 263 // Make sure the overlay window is on top.
263 web_contents_window_->StackChildAtTop(window_.get()); 264 web_contents_window_->StackChildAtTop(window_.get());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 318
318 void OverscrollNavigationOverlay::DidStopLoading() { 319 void OverscrollNavigationOverlay::DidStopLoading() {
319 // Don't compare URLs in this case - it's possible they won't match if 320 // Don't compare URLs in this case - it's possible they won't match if
320 // a gesture-nav initiated navigation was interrupted by some other in-site 321 // a gesture-nav initiated navigation was interrupted by some other in-site
321 // navigation (e.g., from a script, or from a bookmark). 322 // navigation (e.g., from a script, or from a bookmark).
322 loading_complete_ = true; 323 loading_complete_ = true;
323 StopObservingIfDone(); 324 StopObservingIfDone();
324 } 325 }
325 326
326 } // namespace content 327 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/aura/overscroll_window_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698