| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 static_cast<WebViewBase*>(web_view_->Client()->CreateView( | 389 static_cast<WebViewBase*>(web_view_->Client()->CreateView( |
| 390 WebLocalFrameImpl::FromFrame(frame), | 390 WebLocalFrameImpl::FromFrame(frame), |
| 391 WrappedResourceRequest(r.GetResourceRequest()), features, | 391 WrappedResourceRequest(r.GetResourceRequest()), features, |
| 392 r.FrameName(), policy, | 392 r.FrameName(), policy, |
| 393 r.GetShouldSetOpener() == kNeverSetOpener || features.noopener)); | 393 r.GetShouldSetOpener() == kNeverSetOpener || features.noopener)); |
| 394 if (!new_view) | 394 if (!new_view) |
| 395 return nullptr; | 395 return nullptr; |
| 396 return new_view->GetPage(); | 396 return new_view->GetPage(); |
| 397 } | 397 } |
| 398 | 398 |
| 399 void ChromeClientImpl::DidOverscroll(const FloatSize& overscroll_delta, | 399 void ChromeClientImpl::DidOverscroll( |
| 400 const FloatSize& accumulated_overscroll, | 400 const FloatSize& overscroll_delta, |
| 401 const FloatPoint& position_in_viewport, | 401 const FloatSize& accumulated_overscroll, |
| 402 const FloatSize& velocity_in_viewport) { | 402 const FloatPoint& position_in_viewport, |
| 403 const FloatSize& velocity_in_viewport, |
| 404 const WebScrollBoundaryBehavior& behavior) { |
| 403 if (!web_view_->Client()) | 405 if (!web_view_->Client()) |
| 404 return; | 406 return; |
| 405 | 407 |
| 406 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll, | 408 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll, |
| 407 position_in_viewport, | 409 position_in_viewport, velocity_in_viewport, |
| 408 velocity_in_viewport); | 410 behavior); |
| 409 } | 411 } |
| 410 | 412 |
| 411 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) { | 413 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) { |
| 412 if (web_view_->Client()) | 414 if (web_view_->Client()) |
| 413 web_view_->Client()->Show( | 415 web_view_->Client()->Show( |
| 414 EffectiveNavigationPolicy(navigation_policy, window_features_)); | 416 EffectiveNavigationPolicy(navigation_policy, window_features_)); |
| 415 } | 417 } |
| 416 | 418 |
| 417 void ChromeClientImpl::SetToolbarsVisible(bool value) { | 419 void ChromeClientImpl::SetToolbarsVisible(bool value) { |
| 418 window_features_.tool_bar_visible = value; | 420 window_features_.tool_bar_visible = value; |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 | 1178 |
| 1177 void ChromeClientImpl::RegisterViewportLayers() const { | 1179 void ChromeClientImpl::RegisterViewportLayers() const { |
| 1178 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) | 1180 if (web_view_->RootGraphicsLayer() && web_view_->LayerTreeView()) |
| 1179 web_view_->RegisterViewportLayersWithCompositor(); | 1181 web_view_->RegisterViewportLayersWithCompositor(); |
| 1180 } | 1182 } |
| 1181 | 1183 |
| 1182 void ChromeClientImpl::DidUpdateBrowserControls() const { | 1184 void ChromeClientImpl::DidUpdateBrowserControls() const { |
| 1183 web_view_->DidUpdateBrowserControls(); | 1185 web_view_->DidUpdateBrowserControls(); |
| 1184 } | 1186 } |
| 1185 | 1187 |
| 1188 void ChromeClientImpl::SetScrollBoundaryBehavior( |
| 1189 WebScrollBoundaryBehavior scroll_boundary_behavior) const { |
| 1190 web_view_->SetScrollBoundaryBehavior(scroll_boundary_behavior); |
| 1191 } |
| 1192 |
| 1186 CompositorWorkerProxyClient* | 1193 CompositorWorkerProxyClient* |
| 1187 ChromeClientImpl::CreateCompositorWorkerProxyClient(LocalFrame* frame) { | 1194 ChromeClientImpl::CreateCompositorWorkerProxyClient(LocalFrame* frame) { |
| 1188 WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame); | 1195 WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame); |
| 1189 return web_frame->LocalRoot() | 1196 return web_frame->LocalRoot() |
| 1190 ->FrameWidget() | 1197 ->FrameWidget() |
| 1191 ->CreateCompositorWorkerProxyClient(); | 1198 ->CreateCompositorWorkerProxyClient(); |
| 1192 } | 1199 } |
| 1193 | 1200 |
| 1194 AnimationWorkletProxyClient* | 1201 AnimationWorkletProxyClient* |
| 1195 ChromeClientImpl::CreateAnimationWorkletProxyClient(LocalFrame* frame) { | 1202 ChromeClientImpl::CreateAnimationWorkletProxyClient(LocalFrame* frame) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1254 if (RuntimeEnabledFeatures::presentationEnabled()) | 1261 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1255 PresentationController::ProvideTo(frame, client->PresentationClient()); | 1262 PresentationController::ProvideTo(frame, client->PresentationClient()); |
| 1256 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { | 1263 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { |
| 1257 ProvideAudioOutputDeviceClientTo(frame, | 1264 ProvideAudioOutputDeviceClientTo(frame, |
| 1258 new AudioOutputDeviceClientImpl(frame)); | 1265 new AudioOutputDeviceClientImpl(frame)); |
| 1259 } | 1266 } |
| 1260 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); | 1267 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); |
| 1261 } | 1268 } |
| 1262 | 1269 |
| 1263 } // namespace blink | 1270 } // namespace blink |
| OLD | NEW |