OLD | NEW |
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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 WebLocalFrameImpl::FromFrame(frame), | 277 WebLocalFrameImpl::FromFrame(frame), |
278 WrappedResourceRequest(r.GetResourceRequest()), features, frame_name, | 278 WrappedResourceRequest(r.GetResourceRequest()), features, frame_name, |
279 static_cast<WebNavigationPolicy>(navigation_policy), | 279 static_cast<WebNavigationPolicy>(navigation_policy), |
280 r.GetShouldSetOpener() == kNeverSetOpener, | 280 r.GetShouldSetOpener() == kNeverSetOpener, |
281 static_cast<WebSandboxFlags>(sandbox_flags))); | 281 static_cast<WebSandboxFlags>(sandbox_flags))); |
282 if (!new_view) | 282 if (!new_view) |
283 return nullptr; | 283 return nullptr; |
284 return new_view->GetPage(); | 284 return new_view->GetPage(); |
285 } | 285 } |
286 | 286 |
287 void ChromeClientImpl::DidOverscroll(const FloatSize& overscroll_delta, | 287 void ChromeClientImpl::DidOverscroll( |
288 const FloatSize& accumulated_overscroll, | 288 const FloatSize& overscroll_delta, |
289 const FloatPoint& position_in_viewport, | 289 const FloatSize& accumulated_overscroll, |
290 const FloatSize& velocity_in_viewport) { | 290 const FloatPoint& position_in_viewport, |
| 291 const FloatSize& velocity_in_viewport, |
| 292 const WebScrollBoundaryBehavior& behavior) { |
291 if (!web_view_->Client()) | 293 if (!web_view_->Client()) |
292 return; | 294 return; |
293 | 295 |
294 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll, | 296 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll, |
295 position_in_viewport, | 297 position_in_viewport, velocity_in_viewport, |
296 velocity_in_viewport); | 298 behavior); |
297 } | 299 } |
298 | 300 |
299 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) { | 301 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) { |
300 if (web_view_->Client()) { | 302 if (web_view_->Client()) { |
301 web_view_->Client()->Show( | 303 web_view_->Client()->Show( |
302 static_cast<WebNavigationPolicy>(navigation_policy)); | 304 static_cast<WebNavigationPolicy>(navigation_policy)); |
303 } | 305 } |
304 } | 306 } |
305 | 307 |
306 bool ChromeClientImpl::ShouldReportDetailedMessageForSource( | 308 bool ChromeClientImpl::ShouldReportDetailedMessageForSource( |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 | 1060 |
1059 void ChromeClientImpl::RegisterViewportLayers() const { | 1061 void ChromeClientImpl::RegisterViewportLayers() const { |
1060 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) | 1062 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) |
1061 web_view_->RegisterViewportLayersWithCompositor(); | 1063 web_view_->RegisterViewportLayersWithCompositor(); |
1062 } | 1064 } |
1063 | 1065 |
1064 void ChromeClientImpl::DidUpdateBrowserControls() const { | 1066 void ChromeClientImpl::DidUpdateBrowserControls() const { |
1065 web_view_->DidUpdateBrowserControls(); | 1067 web_view_->DidUpdateBrowserControls(); |
1066 } | 1068 } |
1067 | 1069 |
| 1070 void ChromeClientImpl::SetScrollBoundaryBehavior( |
| 1071 const WebScrollBoundaryBehavior& scroll_boundary_behavior) { |
| 1072 web_view_->SetScrollBoundaryBehavior(scroll_boundary_behavior); |
| 1073 } |
| 1074 |
1068 void ChromeClientImpl::RegisterPopupOpeningObserver( | 1075 void ChromeClientImpl::RegisterPopupOpeningObserver( |
1069 PopupOpeningObserver* observer) { | 1076 PopupOpeningObserver* observer) { |
1070 DCHECK(observer); | 1077 DCHECK(observer); |
1071 popup_opening_observers_.push_back(observer); | 1078 popup_opening_observers_.push_back(observer); |
1072 } | 1079 } |
1073 | 1080 |
1074 void ChromeClientImpl::UnregisterPopupOpeningObserver( | 1081 void ChromeClientImpl::UnregisterPopupOpeningObserver( |
1075 PopupOpeningObserver* observer) { | 1082 PopupOpeningObserver* observer) { |
1076 size_t index = popup_opening_observers_.Find(observer); | 1083 size_t index = popup_opening_observers_.Find(observer); |
1077 DCHECK_NE(index, kNotFound); | 1084 DCHECK_NE(index, kNotFound); |
(...skipping 29 matching lines...) Expand all Loading... |
1107 if (!frame) { | 1114 if (!frame) { |
1108 // It is possible to pass nullptr to this method. For instance the call from | 1115 // It is possible to pass nullptr to this method. For instance the call from |
1109 // OnMouseDown might be nullptr. See https://crbug.com/739199. | 1116 // OnMouseDown might be nullptr. See https://crbug.com/739199. |
1110 return nullptr; | 1117 return nullptr; |
1111 } | 1118 } |
1112 | 1119 |
1113 return WebLocalFrameImpl::FromFrame(frame)->AutofillClient(); | 1120 return WebLocalFrameImpl::FromFrame(frame)->AutofillClient(); |
1114 } | 1121 } |
1115 | 1122 |
1116 } // namespace blink | 1123 } // namespace blink |
OLD | NEW |