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

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: Update input_messages with the order in the enum. Created 3 years, 4 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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 1066
1065 void ChromeClientImpl::RegisterViewportLayers() const { 1067 void ChromeClientImpl::RegisterViewportLayers() const {
1066 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) 1068 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView())
1067 web_view_->RegisterViewportLayersWithCompositor(); 1069 web_view_->RegisterViewportLayersWithCompositor();
1068 } 1070 }
1069 1071
1070 void ChromeClientImpl::DidUpdateBrowserControls() const { 1072 void ChromeClientImpl::DidUpdateBrowserControls() const {
1071 web_view_->DidUpdateBrowserControls(); 1073 web_view_->DidUpdateBrowserControls();
1072 } 1074 }
1073 1075
1076 void ChromeClientImpl::SetScrollBoundaryBehavior(
1077 const WebScrollBoundaryBehavior& scroll_boundary_behavior) {
1078 web_view_->SetScrollBoundaryBehavior(scroll_boundary_behavior);
1079 }
1080
1074 void ChromeClientImpl::RegisterPopupOpeningObserver( 1081 void ChromeClientImpl::RegisterPopupOpeningObserver(
1075 PopupOpeningObserver* observer) { 1082 PopupOpeningObserver* observer) {
1076 DCHECK(observer); 1083 DCHECK(observer);
1077 popup_opening_observers_.push_back(observer); 1084 popup_opening_observers_.push_back(observer);
1078 } 1085 }
1079 1086
1080 void ChromeClientImpl::UnregisterPopupOpeningObserver( 1087 void ChromeClientImpl::UnregisterPopupOpeningObserver(
1081 PopupOpeningObserver* observer) { 1088 PopupOpeningObserver* observer) {
1082 size_t index = popup_opening_observers_.Find(observer); 1089 size_t index = popup_opening_observers_.Find(observer);
1083 DCHECK_NE(index, kNotFound); 1090 DCHECK_NE(index, kNotFound);
(...skipping 29 matching lines...) Expand all
1113 if (!frame) { 1120 if (!frame) {
1114 // It is possible to pass nullptr to this method. For instance the call from 1121 // It is possible to pass nullptr to this method. For instance the call from
1115 // OnMouseDown might be nullptr. See https://crbug.com/739199. 1122 // OnMouseDown might be nullptr. See https://crbug.com/739199.
1116 return nullptr; 1123 return nullptr;
1117 } 1124 }
1118 1125
1119 return WebLocalFrameImpl::FromFrame(frame)->AutofillClient(); 1126 return WebLocalFrameImpl::FromFrame(frame)->AutofillClient();
1120 } 1127 }
1121 1128
1122 } // namespace blink 1129 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698