| 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 19 matching lines...) Expand all Loading... |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #include "config.h" | 32 #include "config.h" |
| 33 #include "web/FrameLoaderClientImpl.h" | 33 #include "web/FrameLoaderClientImpl.h" |
| 34 | 34 |
| 35 #include "bindings/core/v8/ScriptController.h" | 35 #include "bindings/core/v8/ScriptController.h" |
| 36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
| 37 #include "core/events/MouseEvent.h" | 37 #include "core/events/MouseEvent.h" |
| 38 #include "core/frame/FrameView.h" | 38 #include "core/frame/FrameView.h" |
| 39 #include "core/frame/Settings.h" | 39 #include "core/frame/Settings.h" |
| 40 #include "core/html/HTMLIFrameElement.h" |
| 40 #include "core/page/Chrome.h" | 41 #include "core/page/Chrome.h" |
| 41 #include "core/page/EventHandler.h" | 42 #include "core/page/EventHandler.h" |
| 42 #include "core/page/Page.h" | 43 #include "core/page/Page.h" |
| 43 #include "core/rendering/HitTestResult.h" | 44 #include "core/rendering/HitTestResult.h" |
| 44 #include "platform/MIMETypeRegistry.h" | 45 #include "platform/MIMETypeRegistry.h" |
| 45 #include "platform/RuntimeEnabledFeatures.h" | 46 #include "platform/RuntimeEnabledFeatures.h" |
| 46 #include "platform/UserGestureIndicator.h" | 47 #include "platform/UserGestureIndicator.h" |
| 47 #include "platform/exported/WrappedResourceRequest.h" | 48 #include "platform/exported/WrappedResourceRequest.h" |
| 48 #include "platform/exported/WrappedResourceResponse.h" | 49 #include "platform/exported/WrappedResourceResponse.h" |
| 49 #include "platform/network/HTTPParsers.h" | 50 #include "platform/network/HTTPParsers.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na
vigationPolicy policy, const String& suggestedName) | 244 void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na
vigationPolicy policy, const String& suggestedName) |
| 244 { | 245 { |
| 245 if (m_webFrame->client()) { | 246 if (m_webFrame->client()) { |
| 246 ASSERT(m_webFrame->frame()->document()); | 247 ASSERT(m_webFrame->frame()->document()); |
| 247 WrappedResourceRequest webreq(request); | 248 WrappedResourceRequest webreq(request); |
| 248 m_webFrame->client()->loadURLExternally( | 249 m_webFrame->client()->loadURLExternally( |
| 249 m_webFrame, webreq, static_cast<WebNavigationPolicy>(policy), sugges
tedName); | 250 m_webFrame, webreq, static_cast<WebNavigationPolicy>(policy), sugges
tedName); |
| 250 } | 251 } |
| 251 } | 252 } |
| 252 | 253 |
| 254 void FrameLoaderClientImpl::createView(const KURL& url) |
| 255 { |
| 256 if (m_webFrame->client()) { |
| 257 m_webFrame->client()->createChildView(url); |
| 258 } |
| 259 } |
| 260 |
| 253 void FrameLoaderClientImpl::selectorMatchChanged(const Vector<String>& addedSele
ctors, const Vector<String>& removedSelectors) | 261 void FrameLoaderClientImpl::selectorMatchChanged(const Vector<String>& addedSele
ctors, const Vector<String>& removedSelectors) |
| 254 { | 262 { |
| 255 if (WebFrameClient* client = m_webFrame->client()) | 263 if (WebFrameClient* client = m_webFrame->client()) |
| 256 client->didMatchCSS(m_webFrame, WebVector<WebString>(addedSelectors), We
bVector<WebString>(removedSelectors)); | 264 client->didMatchCSS(m_webFrame, WebVector<WebString>(addedSelectors), We
bVector<WebString>(removedSelectors)); |
| 257 } | 265 } |
| 258 | 266 |
| 259 // Called when the FrameLoader goes into a state in which a new page load | 267 // Called when the FrameLoader goes into a state in which a new page load |
| 260 // will occur. | 268 // will occur. |
| 261 void FrameLoaderClientImpl::transitionToCommittedForNewPage() | 269 void FrameLoaderClientImpl::transitionToCommittedForNewPage() |
| 262 { | 270 { |
| 263 m_webFrame->createFrameView(); | 271 m_webFrame->createFrameView(); |
| 264 } | 272 } |
| 265 | 273 |
| 266 void FrameLoaderClientImpl::didLoseWebGLContext(int arbRobustnessContextLostReas
on) | 274 void FrameLoaderClientImpl::didLoseWebGLContext(int arbRobustnessContextLostReas
on) |
| 267 { | 275 { |
| 268 if (m_webFrame->client()) | 276 if (m_webFrame->client()) |
| 269 m_webFrame->client()->didLoseWebGLContext(m_webFrame, arbRobustnessConte
xtLostReason); | 277 m_webFrame->client()->didLoseWebGLContext(m_webFrame, arbRobustnessConte
xtLostReason); |
| 270 } | 278 } |
| 271 | 279 |
| 272 void FrameLoaderClientImpl::dispatchDidChangeManifest() | 280 void FrameLoaderClientImpl::dispatchDidChangeManifest() |
| 273 { | 281 { |
| 274 if (m_webFrame->client()) | 282 if (m_webFrame->client()) |
| 275 m_webFrame->client()->didChangeManifest(m_webFrame); | 283 m_webFrame->client()->didChangeManifest(m_webFrame); |
| 276 } | 284 } |
| 277 | 285 |
| 278 } // namespace blink | 286 } // namespace blink |
| OLD | NEW |