| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 } | 198 } |
| 199 | 199 |
| 200 void ChromeClientImpl::focusedFrameChanged(LocalFrame* frame) | 200 void ChromeClientImpl::focusedFrameChanged(LocalFrame* frame) |
| 201 { | 201 { |
| 202 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); | 202 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); |
| 203 if (webframe && webframe->client()) | 203 if (webframe && webframe->client()) |
| 204 webframe->client()->frameFocused(); | 204 webframe->client()->frameFocused(); |
| 205 } | 205 } |
| 206 | 206 |
| 207 Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest&
r, const WindowFeatures& features, | 207 Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest&
r, const WindowFeatures& features, |
| 208 NavigationPolicy navigationPolicy, ShouldSendReferrer shouldSendReferrer) | 208 NavigationPolicy navigationPolicy, ReferrerPolicy referrerPolicy) |
| 209 { | 209 { |
| 210 if (!m_webView->client()) | 210 if (!m_webView->client()) |
| 211 return nullptr; | 211 return nullptr; |
| 212 | 212 |
| 213 WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPoli
cy); | 213 WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPoli
cy); |
| 214 if (policy == WebNavigationPolicyIgnore) | 214 if (policy == WebNavigationPolicyIgnore) |
| 215 policy = getNavigationPolicy(features); | 215 policy = getNavigationPolicy(features); |
| 216 else if (policy == WebNavigationPolicyNewBackgroundTab && getNavigationPolic
y(features) != WebNavigationPolicyNewBackgroundTab && !UIEventWithKeyState::newT
abModifierSetFromIsolatedWorld()) | 216 else if (policy == WebNavigationPolicyNewBackgroundTab && getNavigationPolic
y(features) != WebNavigationPolicyNewBackgroundTab && !UIEventWithKeyState::newT
abModifierSetFromIsolatedWorld()) |
| 217 policy = WebNavigationPolicyNewForegroundTab; | 217 policy = WebNavigationPolicyNewForegroundTab; |
| 218 | 218 |
| 219 ASSERT(frame->document()); | 219 ASSERT(frame->document()); |
| 220 Fullscreen::fullyExitFullscreen(*frame->document()); | 220 Fullscreen::fullyExitFullscreen(*frame->document()); |
| 221 | 221 |
| 222 WebViewImpl* newView = toWebViewImpl( | 222 WebViewImpl* newView = toWebViewImpl( |
| 223 m_webView->client()->createView(WebLocalFrameImpl::fromFrame(frame), Wra
ppedResourceRequest(r.resourceRequest()), features, r.frameName(), policy, shoul
dSendReferrer == NeverSendReferrer)); | 223 m_webView->client()->createView(WebLocalFrameImpl::fromFrame(frame), Wra
ppedResourceRequest(r.resourceRequest()), features, r.frameName(), policy, refer
rerPolicy == ReferrerPolicyNever)); |
| 224 if (!newView) | 224 if (!newView) |
| 225 return nullptr; | 225 return nullptr; |
| 226 return newView->page(); | 226 return newView->page(); |
| 227 } | 227 } |
| 228 | 228 |
| 229 static inline void updatePolicyForEvent(const WebInputEvent* inputEvent, Navigat
ionPolicy* policy) | 229 static inline void updatePolicyForEvent(const WebInputEvent* inputEvent, Navigat
ionPolicy* policy) |
| 230 { | 230 { |
| 231 if (!inputEvent || inputEvent->type != WebInputEvent::MouseUp) | 231 if (!inputEvent || inputEvent->type != WebInputEvent::MouseUp) |
| 232 return; | 232 return; |
| 233 | 233 |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView()) | 910 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView()) |
| 911 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); | 911 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie
w(m_webView->layerTreeView()); |
| 912 } | 912 } |
| 913 | 913 |
| 914 void ChromeClientImpl::didUpdateTopControls() const | 914 void ChromeClientImpl::didUpdateTopControls() const |
| 915 { | 915 { |
| 916 m_webView->didUpdateTopControls(); | 916 m_webView->didUpdateTopControls(); |
| 917 } | 917 } |
| 918 | 918 |
| 919 } // namespace blink | 919 } // namespace blink |
| OLD | NEW |