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

Side by Side Diff: third_party/WebKit/Source/core/page/ChromeClientImpl.cpp

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: rebase 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 WebLocalFrameImpl::FromFrame(frame), 276 WebLocalFrameImpl::FromFrame(frame),
277 WrappedResourceRequest(r.GetResourceRequest()), features, frame_name, 277 WrappedResourceRequest(r.GetResourceRequest()), features, frame_name,
278 static_cast<WebNavigationPolicy>(navigation_policy), 278 static_cast<WebNavigationPolicy>(navigation_policy),
279 r.GetShouldSetOpener() == kNeverSetOpener, 279 r.GetShouldSetOpener() == kNeverSetOpener,
280 static_cast<WebSandboxFlags>(sandbox_flags))); 280 static_cast<WebSandboxFlags>(sandbox_flags)));
281 if (!new_view) 281 if (!new_view)
282 return nullptr; 282 return nullptr;
283 return new_view->GetPage(); 283 return new_view->GetPage();
284 } 284 }
285 285
286 void ChromeClientImpl::DidOverscroll(const FloatSize& overscroll_delta, 286 void ChromeClientImpl::DidOverscroll(
287 const FloatSize& accumulated_overscroll, 287 const FloatSize& overscroll_delta,
288 const FloatPoint& position_in_viewport, 288 const FloatSize& accumulated_overscroll,
289 const FloatSize& velocity_in_viewport) { 289 const FloatPoint& position_in_viewport,
290 const FloatSize& velocity_in_viewport,
291 const WebScrollBoundaryBehavior& behavior) {
290 if (!web_view_->Client()) 292 if (!web_view_->Client())
291 return; 293 return;
292 294
293 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll, 295 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll,
294 position_in_viewport, 296 position_in_viewport, velocity_in_viewport,
295 velocity_in_viewport); 297 behavior);
296 } 298 }
297 299
298 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) { 300 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) {
299 if (web_view_->Client()) { 301 if (web_view_->Client()) {
300 web_view_->Client()->Show( 302 web_view_->Client()->Show(
301 static_cast<WebNavigationPolicy>(navigation_policy)); 303 static_cast<WebNavigationPolicy>(navigation_policy));
302 } 304 }
303 } 305 }
304 306
305 bool ChromeClientImpl::ShouldReportDetailedMessageForSource( 307 bool ChromeClientImpl::ShouldReportDetailedMessageForSource(
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 1081
1080 void ChromeClientImpl::RegisterViewportLayers() const { 1082 void ChromeClientImpl::RegisterViewportLayers() const {
1081 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) 1083 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView())
1082 web_view_->RegisterViewportLayersWithCompositor(); 1084 web_view_->RegisterViewportLayersWithCompositor();
1083 } 1085 }
1084 1086
1085 void ChromeClientImpl::DidUpdateBrowserControls() const { 1087 void ChromeClientImpl::DidUpdateBrowserControls() const {
1086 web_view_->DidUpdateBrowserControls(); 1088 web_view_->DidUpdateBrowserControls();
1087 } 1089 }
1088 1090
1091 void ChromeClientImpl::SetScrollBoundaryBehavior(
1092 const WebScrollBoundaryBehavior& scroll_boundary_behavior) {
1093 web_view_->SetScrollBoundaryBehavior(scroll_boundary_behavior);
1094 }
1095
1089 void ChromeClientImpl::RegisterPopupOpeningObserver( 1096 void ChromeClientImpl::RegisterPopupOpeningObserver(
1090 PopupOpeningObserver* observer) { 1097 PopupOpeningObserver* observer) {
1091 DCHECK(observer); 1098 DCHECK(observer);
1092 popup_opening_observers_.push_back(observer); 1099 popup_opening_observers_.push_back(observer);
1093 } 1100 }
1094 1101
1095 void ChromeClientImpl::UnregisterPopupOpeningObserver( 1102 void ChromeClientImpl::UnregisterPopupOpeningObserver(
1096 PopupOpeningObserver* observer) { 1103 PopupOpeningObserver* observer) {
1097 size_t index = popup_opening_observers_.Find(observer); 1104 size_t index = popup_opening_observers_.Find(observer);
1098 DCHECK_NE(index, kNotFound); 1105 DCHECK_NE(index, kNotFound);
(...skipping 18 matching lines...) Expand all
1117 std::unique_ptr<WebFrameScheduler> ChromeClientImpl::CreateFrameScheduler( 1124 std::unique_ptr<WebFrameScheduler> ChromeClientImpl::CreateFrameScheduler(
1118 BlameContext* blame_context) { 1125 BlameContext* blame_context) {
1119 return web_view_->Scheduler()->CreateFrameScheduler(blame_context); 1126 return web_view_->Scheduler()->CreateFrameScheduler(blame_context);
1120 } 1127 }
1121 1128
1122 double ChromeClientImpl::LastFrameTimeMonotonic() const { 1129 double ChromeClientImpl::LastFrameTimeMonotonic() const {
1123 return web_view_->LastFrameTimeMonotonic(); 1130 return web_view_->LastFrameTimeMonotonic();
1124 } 1131 }
1125 1132
1126 } // namespace blink 1133 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698