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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 | 1054 |
1053 void ChromeClientImpl::RegisterViewportLayers() const { | 1055 void ChromeClientImpl::RegisterViewportLayers() const { |
1054 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) | 1056 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) |
1055 web_view_->RegisterViewportLayersWithCompositor(); | 1057 web_view_->RegisterViewportLayersWithCompositor(); |
1056 } | 1058 } |
1057 | 1059 |
1058 void ChromeClientImpl::DidUpdateBrowserControls() const { | 1060 void ChromeClientImpl::DidUpdateBrowserControls() const { |
1059 web_view_->DidUpdateBrowserControls(); | 1061 web_view_->DidUpdateBrowserControls(); |
1060 } | 1062 } |
1061 | 1063 |
| 1064 void ChromeClientImpl::SetScrollBoundaryBehavior( |
| 1065 const WebScrollBoundaryBehavior& scroll_boundary_behavior) { |
| 1066 web_view_->SetScrollBoundaryBehavior(scroll_boundary_behavior); |
| 1067 } |
| 1068 |
1062 void ChromeClientImpl::RegisterPopupOpeningObserver( | 1069 void ChromeClientImpl::RegisterPopupOpeningObserver( |
1063 PopupOpeningObserver* observer) { | 1070 PopupOpeningObserver* observer) { |
1064 DCHECK(observer); | 1071 DCHECK(observer); |
1065 popup_opening_observers_.push_back(observer); | 1072 popup_opening_observers_.push_back(observer); |
1066 } | 1073 } |
1067 | 1074 |
1068 void ChromeClientImpl::UnregisterPopupOpeningObserver( | 1075 void ChromeClientImpl::UnregisterPopupOpeningObserver( |
1069 PopupOpeningObserver* observer) { | 1076 PopupOpeningObserver* observer) { |
1070 size_t index = popup_opening_observers_.Find(observer); | 1077 size_t index = popup_opening_observers_.Find(observer); |
1071 DCHECK_NE(index, kNotFound); | 1078 DCHECK_NE(index, kNotFound); |
(...skipping 29 matching lines...) Expand all Loading... |
1101 if (!frame) { | 1108 if (!frame) { |
1102 // It is possible to pass nullptr to this method. For instance the call from | 1109 // It is possible to pass nullptr to this method. For instance the call from |
1103 // OnMouseDown might be nullptr. See https://crbug.com/739199. | 1110 // OnMouseDown might be nullptr. See https://crbug.com/739199. |
1104 return nullptr; | 1111 return nullptr; |
1105 } | 1112 } |
1106 | 1113 |
1107 return WebLocalFrameImpl::FromFrame(frame)->AutofillClient(); | 1114 return WebLocalFrameImpl::FromFrame(frame)->AutofillClient(); |
1108 } | 1115 } |
1109 | 1116 |
1110 } // namespace blink | 1117 } // namespace blink |
OLD | NEW |