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

Side by Side Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: format 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 1076
1075 void ChromeClientImpl::RegisterViewportLayers() const { 1077 void ChromeClientImpl::RegisterViewportLayers() const {
1076 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) 1078 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView())
1077 web_view_->RegisterViewportLayersWithCompositor(); 1079 web_view_->RegisterViewportLayersWithCompositor();
1078 } 1080 }
1079 1081
1080 void ChromeClientImpl::DidUpdateBrowserControls() const { 1082 void ChromeClientImpl::DidUpdateBrowserControls() const {
1081 web_view_->DidUpdateBrowserControls(); 1083 web_view_->DidUpdateBrowserControls();
1082 } 1084 }
1083 1085
1086 void ChromeClientImpl::SetScrollBoundaryBehavior(
1087 const WebScrollBoundaryBehavior& scroll_boundary_behavior) {
1088 web_view_->SetScrollBoundaryBehavior(scroll_boundary_behavior);
1089 }
1090
1084 void ChromeClientImpl::RegisterPopupOpeningObserver( 1091 void ChromeClientImpl::RegisterPopupOpeningObserver(
1085 PopupOpeningObserver* observer) { 1092 PopupOpeningObserver* observer) {
1086 DCHECK(observer); 1093 DCHECK(observer);
1087 popup_opening_observers_.push_back(observer); 1094 popup_opening_observers_.push_back(observer);
1088 } 1095 }
1089 1096
1090 void ChromeClientImpl::UnregisterPopupOpeningObserver( 1097 void ChromeClientImpl::UnregisterPopupOpeningObserver(
1091 PopupOpeningObserver* observer) { 1098 PopupOpeningObserver* observer) {
1092 size_t index = popup_opening_observers_.Find(observer); 1099 size_t index = popup_opening_observers_.Find(observer);
1093 DCHECK_NE(index, kNotFound); 1100 DCHECK_NE(index, kNotFound);
(...skipping 18 matching lines...) Expand all
1112 std::unique_ptr<WebFrameScheduler> ChromeClientImpl::CreateFrameScheduler( 1119 std::unique_ptr<WebFrameScheduler> ChromeClientImpl::CreateFrameScheduler(
1113 BlameContext* blame_context) { 1120 BlameContext* blame_context) {
1114 return web_view_->Scheduler()->CreateFrameScheduler(blame_context); 1121 return web_view_->Scheduler()->CreateFrameScheduler(blame_context);
1115 } 1122 }
1116 1123
1117 double ChromeClientImpl::LastFrameTimeMonotonic() const { 1124 double ChromeClientImpl::LastFrameTimeMonotonic() const {
1118 return web_view_->LastFrameTimeMonotonic(); 1125 return web_view_->LastFrameTimeMonotonic();
1119 } 1126 }
1120 1127
1121 } // namespace blink 1128 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698