| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 FrameLoaderClientImpl::~FrameLoaderClientImpl() | 111 FrameLoaderClientImpl::~FrameLoaderClientImpl() |
| 112 { | 112 { |
| 113 } | 113 } |
| 114 | 114 |
| 115 void FrameLoaderClientImpl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*
world) | 115 void FrameLoaderClientImpl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*
world) |
| 116 { | 116 { |
| 117 if (m_webFrame->client()) { | 117 if (m_webFrame->client()) { |
| 118 m_webFrame->client()->didClearWindowObject(m_webFrame, world->worldId())
; | 118 m_webFrame->client()->didClearWindowObject(m_webFrame, world->worldId())
; |
| 119 Document* document = m_webFrame->frame()->document(); | 119 Document* document = m_webFrame->frame()->document(); |
| 120 if (document) { | 120 if (document) { |
| 121 WheelController::from(document); | 121 WheelController::from(*document); |
| 122 if (RuntimeEnabledFeatures::deviceMotionEnabled()) | 122 if (RuntimeEnabledFeatures::deviceMotionEnabled()) |
| 123 DeviceMotionController::from(document); | 123 DeviceMotionController::from(*document); |
| 124 if (RuntimeEnabledFeatures::deviceOrientationEnabled()) | 124 if (RuntimeEnabledFeatures::deviceOrientationEnabled()) |
| 125 DeviceOrientationController::from(document); | 125 DeviceOrientationController::from(*document); |
| 126 if (RuntimeEnabledFeatures::screenOrientationEnabled()) | 126 if (RuntimeEnabledFeatures::screenOrientationEnabled()) |
| 127 ScreenOrientationController::from(document); | 127 ScreenOrientationController::from(*document); |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 | 131 |
| 132 void FrameLoaderClientImpl::documentElementAvailable() | 132 void FrameLoaderClientImpl::documentElementAvailable() |
| 133 { | 133 { |
| 134 if (m_webFrame->client()) | 134 if (m_webFrame->client()) |
| 135 m_webFrame->client()->didCreateDocumentElement(m_webFrame); | 135 m_webFrame->client()->didCreateDocumentElement(m_webFrame); |
| 136 } | 136 } |
| 137 | 137 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 { | 500 { |
| 501 // FIXME: why might the webview be null? http://b/1234461 | 501 // FIXME: why might the webview be null? http://b/1234461 |
| 502 WebViewImpl* webview = m_webFrame->viewImpl(); | 502 WebViewImpl* webview = m_webFrame->viewImpl(); |
| 503 if (webview && webview->client()) | 503 if (webview && webview->client()) |
| 504 webview->client()->didStopLoading(); | 504 webview->client()->didStopLoading(); |
| 505 } | 505 } |
| 506 | 506 |
| 507 void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na
vigationPolicy policy, const String& suggestedName) | 507 void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na
vigationPolicy policy, const String& suggestedName) |
| 508 { | 508 { |
| 509 if (m_webFrame->client()) { | 509 if (m_webFrame->client()) { |
| 510 DocumentFullscreen::webkitCancelFullScreen(m_webFrame->frame()->document
()); | 510 ASSERT(m_webFrame->frame()->document()); |
| 511 DocumentFullscreen::webkitCancelFullScreen(*m_webFrame->frame()->documen
t()); |
| 511 WrappedResourceRequest webreq(request); | 512 WrappedResourceRequest webreq(request); |
| 512 m_webFrame->client()->loadURLExternally( | 513 m_webFrame->client()->loadURLExternally( |
| 513 m_webFrame, webreq, static_cast<WebNavigationPolicy>(policy), sugges
tedName); | 514 m_webFrame, webreq, static_cast<WebNavigationPolicy>(policy), sugges
tedName); |
| 514 } | 515 } |
| 515 } | 516 } |
| 516 | 517 |
| 517 bool FrameLoaderClientImpl::navigateBackForward(int offset) const | 518 bool FrameLoaderClientImpl::navigateBackForward(int offset) const |
| 518 { | 519 { |
| 519 WebViewImpl* webview = m_webFrame->viewImpl(); | 520 WebViewImpl* webview = m_webFrame->viewImpl(); |
| 520 if (!webview->client()) | 521 if (!webview->client()) |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 return adoptPtr(m_webFrame->client()->createApplicationCacheHost(m_webFrame,
client)); | 796 return adoptPtr(m_webFrame->client()->createApplicationCacheHost(m_webFrame,
client)); |
| 796 } | 797 } |
| 797 | 798 |
| 798 void FrameLoaderClientImpl::didStopAllLoaders() | 799 void FrameLoaderClientImpl::didStopAllLoaders() |
| 799 { | 800 { |
| 800 if (m_webFrame->client()) | 801 if (m_webFrame->client()) |
| 801 m_webFrame->client()->didAbortLoading(m_webFrame); | 802 m_webFrame->client()->didAbortLoading(m_webFrame); |
| 802 } | 803 } |
| 803 | 804 |
| 804 } // namespace blink | 805 } // namespace blink |
| OLD | NEW |