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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 static_cast<WebViewBase*>(web_view_->Client()->CreateView( | 289 static_cast<WebViewBase*>(web_view_->Client()->CreateView( |
290 WebLocalFrameImpl::FromFrame(frame), | 290 WebLocalFrameImpl::FromFrame(frame), |
291 WrappedResourceRequest(r.GetResourceRequest()), features, | 291 WrappedResourceRequest(r.GetResourceRequest()), features, |
292 r.FrameName(), static_cast<WebNavigationPolicy>(navigation_policy), | 292 r.FrameName(), static_cast<WebNavigationPolicy>(navigation_policy), |
293 r.GetShouldSetOpener() == kNeverSetOpener)); | 293 r.GetShouldSetOpener() == kNeverSetOpener)); |
294 if (!new_view) | 294 if (!new_view) |
295 return nullptr; | 295 return nullptr; |
296 return new_view->GetPage(); | 296 return new_view->GetPage(); |
297 } | 297 } |
298 | 298 |
299 void ChromeClientImpl::DidOverscroll(const FloatSize& overscroll_delta, | 299 void ChromeClientImpl::DidOverscroll( |
300 const FloatSize& accumulated_overscroll, | 300 const FloatSize& overscroll_delta, |
301 const FloatPoint& position_in_viewport, | 301 const FloatSize& accumulated_overscroll, |
302 const FloatSize& velocity_in_viewport) { | 302 const FloatPoint& position_in_viewport, |
| 303 const FloatSize& velocity_in_viewport, |
| 304 const WebScrollBoundaryBehavior& behavior) { |
303 if (!web_view_->Client()) | 305 if (!web_view_->Client()) |
304 return; | 306 return; |
305 | 307 |
306 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll, | 308 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll, |
307 position_in_viewport, | 309 position_in_viewport, velocity_in_viewport, |
308 velocity_in_viewport); | 310 behavior); |
309 } | 311 } |
310 | 312 |
311 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) { | 313 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) { |
312 if (web_view_->Client()) { | 314 if (web_view_->Client()) { |
313 web_view_->Client()->Show( | 315 web_view_->Client()->Show( |
314 static_cast<WebNavigationPolicy>(navigation_policy)); | 316 static_cast<WebNavigationPolicy>(navigation_policy)); |
315 } | 317 } |
316 } | 318 } |
317 | 319 |
318 bool ChromeClientImpl::ShouldReportDetailedMessageForSource( | 320 bool ChromeClientImpl::ShouldReportDetailedMessageForSource( |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 | 1077 |
1076 void ChromeClientImpl::RegisterViewportLayers() const { | 1078 void ChromeClientImpl::RegisterViewportLayers() const { |
1077 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) | 1079 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) |
1078 web_view_->RegisterViewportLayersWithCompositor(); | 1080 web_view_->RegisterViewportLayersWithCompositor(); |
1079 } | 1081 } |
1080 | 1082 |
1081 void ChromeClientImpl::DidUpdateBrowserControls() const { | 1083 void ChromeClientImpl::DidUpdateBrowserControls() const { |
1082 web_view_->DidUpdateBrowserControls(); | 1084 web_view_->DidUpdateBrowserControls(); |
1083 } | 1085 } |
1084 | 1086 |
| 1087 void ChromeClientImpl::SetScrollBoundaryBehavior( |
| 1088 const WebScrollBoundaryBehavior& scroll_boundary_behavior) { |
| 1089 web_view_->SetScrollBoundaryBehavior(scroll_boundary_behavior); |
| 1090 } |
| 1091 |
1085 CompositorWorkerProxyClient* | 1092 CompositorWorkerProxyClient* |
1086 ChromeClientImpl::CreateCompositorWorkerProxyClient(LocalFrame* frame) { | 1093 ChromeClientImpl::CreateCompositorWorkerProxyClient(LocalFrame* frame) { |
1087 WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame); | 1094 WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame); |
1088 return web_frame->LocalRoot() | 1095 return web_frame->LocalRoot() |
1089 ->FrameWidget() | 1096 ->FrameWidget() |
1090 ->CreateCompositorWorkerProxyClient(); | 1097 ->CreateCompositorWorkerProxyClient(); |
1091 } | 1098 } |
1092 | 1099 |
1093 AnimationWorkletProxyClient* | 1100 AnimationWorkletProxyClient* |
1094 ChromeClientImpl::CreateAnimationWorkletProxyClient(LocalFrame* frame) { | 1101 ChromeClientImpl::CreateAnimationWorkletProxyClient(LocalFrame* frame) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 if (RuntimeEnabledFeatures::PresentationEnabled()) | 1160 if (RuntimeEnabledFeatures::PresentationEnabled()) |
1154 PresentationController::ProvideTo(frame, client->PresentationClient()); | 1161 PresentationController::ProvideTo(frame, client->PresentationClient()); |
1155 if (RuntimeEnabledFeatures::AudioOutputDevicesEnabled()) { | 1162 if (RuntimeEnabledFeatures::AudioOutputDevicesEnabled()) { |
1156 ProvideAudioOutputDeviceClientTo(frame, | 1163 ProvideAudioOutputDeviceClientTo(frame, |
1157 new AudioOutputDeviceClientImpl(frame)); | 1164 new AudioOutputDeviceClientImpl(frame)); |
1158 } | 1165 } |
1159 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); | 1166 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); |
1160 } | 1167 } |
1161 | 1168 |
1162 } // namespace blink | 1169 } // namespace blink |
OLD | NEW |