| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 #include "skia/ext/platform_canvas.h" | 220 #include "skia/ext/platform_canvas.h" |
| 221 #include "web/AssociatedURLLoader.h" | 221 #include "web/AssociatedURLLoader.h" |
| 222 #include "web/AudioOutputDeviceClientImpl.h" | 222 #include "web/AudioOutputDeviceClientImpl.h" |
| 223 #include "web/CompositionUnderlineVectorBuilder.h" | 223 #include "web/CompositionUnderlineVectorBuilder.h" |
| 224 #include "web/FindInPageCoordinates.h" | 224 #include "web/FindInPageCoordinates.h" |
| 225 #include "web/GeolocationClientProxy.h" | 225 #include "web/GeolocationClientProxy.h" |
| 226 #include "web/LocalFileSystemClient.h" | 226 #include "web/LocalFileSystemClient.h" |
| 227 #include "web/MIDIClientProxy.h" | 227 #include "web/MIDIClientProxy.h" |
| 228 #include "web/NavigatorContentUtilsClientImpl.h" | 228 #include "web/NavigatorContentUtilsClientImpl.h" |
| 229 #include "web/NotificationPermissionClientImpl.h" | 229 #include "web/NotificationPermissionClientImpl.h" |
| 230 #include "web/RemoteBridgeFrameOwner.h" | 230 #include "web/RemoteFrameOwner.h" |
| 231 #include "web/SharedWorkerRepositoryClientImpl.h" | 231 #include "web/SharedWorkerRepositoryClientImpl.h" |
| 232 #include "web/SuspendableScriptExecutor.h" | 232 #include "web/SuspendableScriptExecutor.h" |
| 233 #include "web/TextFinder.h" | 233 #include "web/TextFinder.h" |
| 234 #include "web/WebDataSourceImpl.h" | 234 #include "web/WebDataSourceImpl.h" |
| 235 #include "web/WebDevToolsAgentImpl.h" | 235 #include "web/WebDevToolsAgentImpl.h" |
| 236 #include "web/WebFrameWidgetImpl.h" | 236 #include "web/WebFrameWidgetImpl.h" |
| 237 #include "web/WebPluginContainerImpl.h" | 237 #include "web/WebPluginContainerImpl.h" |
| 238 #include "web/WebRemoteFrameImpl.h" | 238 #include "web/WebRemoteFrameImpl.h" |
| 239 #include "web/WebViewImpl.h" | 239 #include "web/WebViewImpl.h" |
| 240 #include "wtf/CurrentTime.h" | 240 #include "wtf/CurrentTime.h" |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = DummyFrameOwner::create(); | 1444 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = DummyFrameOwner::create(); |
| 1445 // TODO(dcheng): This block is very similar to initializeCoreFrame. Try to r
euse it here. | 1445 // TODO(dcheng): This block is very similar to initializeCoreFrame. Try to r
euse it here. |
| 1446 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameL
oaderClientImpl.get(), oldFrame->host(), tempOwner.get()); | 1446 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameL
oaderClientImpl.get(), oldFrame->host(), tempOwner.get()); |
| 1447 // Set the name and unique name directly, bypassing any of the normal logic | 1447 // Set the name and unique name directly, bypassing any of the normal logic |
| 1448 // to calculate unique name. | 1448 // to calculate unique name. |
| 1449 frame->tree().setPrecalculatedName(toWebRemoteFrameImpl(oldWebFrame)->frame(
)->tree().name(), toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName(
)); | 1449 frame->tree().setPrecalculatedName(toWebRemoteFrameImpl(oldWebFrame)->frame(
)->tree().name(), toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName(
)); |
| 1450 webFrame->setCoreFrame(frame); | 1450 webFrame->setCoreFrame(frame); |
| 1451 | 1451 |
| 1452 frame->setOwner(oldFrame->owner()); | 1452 frame->setOwner(oldFrame->owner()); |
| 1453 | 1453 |
| 1454 if (frame->owner() && !frame->owner()->isLocal()) { | 1454 if (frame->owner() && frame->owner()->isRemote()) { |
| 1455 toRemoteBridgeFrameOwner(frame->owner())->setSandboxFlags(static_cast<Sa
ndboxFlags>(flags)); | 1455 toRemoteFrameOwner(frame->owner())->setSandboxFlags(static_cast<SandboxF
lags>(flags)); |
| 1456 // Since a remote frame doesn't get the notifications about frame owner | 1456 // Since a remote frame doesn't get the notifications about frame owner |
| 1457 // property modifications, we need to sync up those properties here. | 1457 // property modifications, we need to sync up those properties here. |
| 1458 webFrame->setFrameOwnerProperties(frameOwnerProperties); | 1458 webFrame->setFrameOwnerProperties(frameOwnerProperties); |
| 1459 } | 1459 } |
| 1460 | 1460 |
| 1461 // We must call init() after m_frame is assigned because it is referenced | 1461 // We must call init() after m_frame is assigned because it is referenced |
| 1462 // during init(). Note that this may dispatch JS events; the frame may be | 1462 // during init(). Note that this may dispatch JS events; the frame may be |
| 1463 // detached after init() returns. | 1463 // detached after init() returns. |
| 1464 frame->init(); | 1464 frame->init(); |
| 1465 #if ENABLE(OILPAN) | 1465 #if ENABLE(OILPAN) |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1863 { | 1863 { |
| 1864 return m_devToolsAgent.get(); | 1864 return m_devToolsAgent.get(); |
| 1865 } | 1865 } |
| 1866 | 1866 |
| 1867 void WebLocalFrameImpl::setFrameOwnerProperties(const WebFrameOwnerProperties& f
rameOwnerProperties) | 1867 void WebLocalFrameImpl::setFrameOwnerProperties(const WebFrameOwnerProperties& f
rameOwnerProperties) |
| 1868 { | 1868 { |
| 1869 // At the moment, this is only used to replicate frame owner properties | 1869 // At the moment, this is only used to replicate frame owner properties |
| 1870 // for frames with a remote owner. | 1870 // for frames with a remote owner. |
| 1871 FrameOwner* owner = frame()->owner(); | 1871 FrameOwner* owner = frame()->owner(); |
| 1872 ASSERT(owner); | 1872 ASSERT(owner); |
| 1873 toRemoteBridgeFrameOwner(owner)->setScrollingMode(frameOwnerProperties.scrol
lingMode); | 1873 toRemoteFrameOwner(owner)->setScrollingMode(frameOwnerProperties.scrollingMo
de); |
| 1874 toRemoteBridgeFrameOwner(owner)->setMarginWidth(frameOwnerProperties.marginW
idth); | 1874 toRemoteFrameOwner(owner)->setMarginWidth(frameOwnerProperties.marginWidth); |
| 1875 toRemoteBridgeFrameOwner(owner)->setMarginHeight(frameOwnerProperties.margin
Height); | 1875 toRemoteFrameOwner(owner)->setMarginHeight(frameOwnerProperties.marginHeight
); |
| 1876 } | 1876 } |
| 1877 | 1877 |
| 1878 WebLocalFrameImpl* WebLocalFrameImpl::localRoot() | 1878 WebLocalFrameImpl* WebLocalFrameImpl::localRoot() |
| 1879 { | 1879 { |
| 1880 // This can't use the LocalFrame::localFrameRoot, since it may be called | 1880 // This can't use the LocalFrame::localFrameRoot, since it may be called |
| 1881 // when the WebLocalFrame exists but the core LocalFrame does not. | 1881 // when the WebLocalFrame exists but the core LocalFrame does not. |
| 1882 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. | 1882 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. |
| 1883 WebLocalFrameImpl* localRoot = this; | 1883 WebLocalFrameImpl* localRoot = this; |
| 1884 while (!localRoot->frameWidget()) | 1884 while (!localRoot->frameWidget()) |
| 1885 localRoot = toWebLocalFrameImpl(localRoot->parent()); | 1885 localRoot = toWebLocalFrameImpl(localRoot->parent()); |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 return WebSandboxFlags::None; | 2188 return WebSandboxFlags::None; |
| 2189 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2189 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
| 2190 } | 2190 } |
| 2191 | 2191 |
| 2192 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2192 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
| 2193 { | 2193 { |
| 2194 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2194 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
| 2195 } | 2195 } |
| 2196 | 2196 |
| 2197 } // namespace blink | 2197 } // namespace blink |
| OLD | NEW |