| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 WebLocalFrameImpl::FromFrame(frame), | 278 WebLocalFrameImpl::FromFrame(frame), |
| 279 WrappedResourceRequest(r.GetResourceRequest()), features, frame_name, | 279 WrappedResourceRequest(r.GetResourceRequest()), features, frame_name, |
| 280 static_cast<WebNavigationPolicy>(navigation_policy), | 280 static_cast<WebNavigationPolicy>(navigation_policy), |
| 281 r.GetShouldSetOpener() == kNeverSetOpener, | 281 r.GetShouldSetOpener() == kNeverSetOpener, |
| 282 static_cast<WebSandboxFlags>(sandbox_flags))); | 282 static_cast<WebSandboxFlags>(sandbox_flags))); |
| 283 if (!new_view) | 283 if (!new_view) |
| 284 return nullptr; | 284 return nullptr; |
| 285 return new_view->GetPage(); | 285 return new_view->GetPage(); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void ChromeClientImpl::DidOverscroll(const FloatSize& overscroll_delta, | 288 void ChromeClientImpl::DidOverscroll( |
| 289 const FloatSize& accumulated_overscroll, | 289 const FloatSize& overscroll_delta, |
| 290 const FloatPoint& position_in_viewport, | 290 const FloatSize& accumulated_overscroll, |
| 291 const FloatSize& velocity_in_viewport) { | 291 const FloatPoint& position_in_viewport, |
| 292 const FloatSize& velocity_in_viewport, |
| 293 const WebScrollBoundaryBehavior& behavior) { |
| 292 if (!web_view_->Client()) | 294 if (!web_view_->Client()) |
| 293 return; | 295 return; |
| 294 | 296 |
| 295 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll, | 297 web_view_->Client()->DidOverscroll(overscroll_delta, accumulated_overscroll, |
| 296 position_in_viewport, | 298 position_in_viewport, velocity_in_viewport, |
| 297 velocity_in_viewport); | 299 behavior); |
| 298 } | 300 } |
| 299 | 301 |
| 300 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) { | 302 void ChromeClientImpl::Show(NavigationPolicy navigation_policy) { |
| 301 if (web_view_->Client()) { | 303 if (web_view_->Client()) { |
| 302 web_view_->Client()->Show( | 304 web_view_->Client()->Show( |
| 303 static_cast<WebNavigationPolicy>(navigation_policy)); | 305 static_cast<WebNavigationPolicy>(navigation_policy)); |
| 304 } | 306 } |
| 305 } | 307 } |
| 306 | 308 |
| 307 bool ChromeClientImpl::ShouldReportDetailedMessageForSource( | 309 bool ChromeClientImpl::ShouldReportDetailedMessageForSource( |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |