| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #include "web/WebDevToolsAgentPrivate.h" | 90 #include "web/WebDevToolsAgentPrivate.h" |
| 91 #include "web/WebLocalFrameImpl.h" | 91 #include "web/WebLocalFrameImpl.h" |
| 92 #include "web/WebPluginContainerImpl.h" | 92 #include "web/WebPluginContainerImpl.h" |
| 93 #include "web/WebPluginLoadObserver.h" | 93 #include "web/WebPluginLoadObserver.h" |
| 94 #include "web/WebViewImpl.h" | 94 #include "web/WebViewImpl.h" |
| 95 #include "wtf/StringExtras.h" | 95 #include "wtf/StringExtras.h" |
| 96 #include "wtf/text/CString.h" | 96 #include "wtf/text/CString.h" |
| 97 #include "wtf/text/WTFString.h" | 97 #include "wtf/text/WTFString.h" |
| 98 #include <v8.h> | 98 #include <v8.h> |
| 99 | 99 |
| 100 using namespace WebCore; | 100 using namespace blink; |
| 101 | 101 |
| 102 namespace blink { | 102 namespace blink { |
| 103 | 103 |
| 104 FrameLoaderClientImpl::FrameLoaderClientImpl(WebLocalFrameImpl* frame) | 104 FrameLoaderClientImpl::FrameLoaderClientImpl(WebLocalFrameImpl* frame) |
| 105 : m_webFrame(frame) | 105 : m_webFrame(frame) |
| 106 { | 106 { |
| 107 } | 107 } |
| 108 | 108 |
| 109 FrameLoaderClientImpl::~FrameLoaderClientImpl() | 109 FrameLoaderClientImpl::~FrameLoaderClientImpl() |
| 110 { | 110 { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 if (!client) | 296 if (!client) |
| 297 return; | 297 return; |
| 298 | 298 |
| 299 m_webFrame->willDetachParent(); | 299 m_webFrame->willDetachParent(); |
| 300 | 300 |
| 301 // Signal that no further communication with WebFrameClient should take | 301 // Signal that no further communication with WebFrameClient should take |
| 302 // place at this point since we are no longer associated with the Page. | 302 // place at this point since we are no longer associated with the Page. |
| 303 m_webFrame->setClient(0); | 303 m_webFrame->setClient(0); |
| 304 | 304 |
| 305 client->frameDetached(m_webFrame); | 305 client->frameDetached(m_webFrame); |
| 306 // Clear our reference to WebCore::LocalFrame at the very end, in case the c
lient | 306 // Clear our reference to blink::LocalFrame at the very end, in case the cli
ent |
| 307 // refers to it. | 307 // refers to it. |
| 308 m_webFrame->setWebCoreFrame(nullptr); | 308 m_webFrame->setWebCoreFrame(nullptr); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void FrameLoaderClientImpl::dispatchWillSendRequest( | 311 void FrameLoaderClientImpl::dispatchWillSendRequest( |
| 312 DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, | 312 DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, |
| 313 const ResourceResponse& redirectResponse) | 313 const ResourceResponse& redirectResponse) |
| 314 { | 314 { |
| 315 // Give the WebFrameClient a crack at the request. | 315 // Give the WebFrameClient a crack at the request. |
| 316 if (m_webFrame->client()) { | 316 if (m_webFrame->client()) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 if (m_webFrame->client()) | 388 if (m_webFrame->client()) |
| 389 m_webFrame->client()->didStartProvisionalLoad(m_webFrame, isTransitionNa
vigation); | 389 m_webFrame->client()->didStartProvisionalLoad(m_webFrame, isTransitionNa
vigation); |
| 390 } | 390 } |
| 391 | 391 |
| 392 void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title) | 392 void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title) |
| 393 { | 393 { |
| 394 if (m_webFrame->client()) | 394 if (m_webFrame->client()) |
| 395 m_webFrame->client()->didReceiveTitle(m_webFrame, title, WebTextDirectio
nLeftToRight); | 395 m_webFrame->client()->didReceiveTitle(m_webFrame, title, WebTextDirectio
nLeftToRight); |
| 396 } | 396 } |
| 397 | 397 |
| 398 void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type) | 398 void FrameLoaderClientImpl::dispatchDidChangeIcons(blink::IconType type) |
| 399 { | 399 { |
| 400 if (m_webFrame->client()) | 400 if (m_webFrame->client()) |
| 401 m_webFrame->client()->didChangeIcon(m_webFrame, static_cast<WebIconURL::
Type>(type)); | 401 m_webFrame->client()->didChangeIcon(m_webFrame, static_cast<WebIconURL::
Type>(type)); |
| 402 } | 402 } |
| 403 | 403 |
| 404 void FrameLoaderClientImpl::dispatchDidCommitLoad(LocalFrame* frame, HistoryItem
* item, HistoryCommitType commitType) | 404 void FrameLoaderClientImpl::dispatchDidCommitLoad(LocalFrame* frame, HistoryItem
* item, HistoryCommitType commitType) |
| 405 { | 405 { |
| 406 m_webFrame->viewImpl()->didCommitLoad(commitType == StandardCommit, false); | 406 m_webFrame->viewImpl()->didCommitLoad(commitType == StandardCommit, false); |
| 407 if (m_webFrame->client()) | 407 if (m_webFrame->client()) |
| 408 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, WebHistoryIte
m(item), static_cast<WebHistoryCommitType>(commitType)); | 408 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, WebHistoryIte
m(item), static_cast<WebHistoryCommitType>(commitType)); |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 m_webFrame->client()->didAbortLoading(m_webFrame); | 822 m_webFrame->client()->didAbortLoading(m_webFrame); |
| 823 } | 823 } |
| 824 | 824 |
| 825 void FrameLoaderClientImpl::dispatchDidChangeManifest() | 825 void FrameLoaderClientImpl::dispatchDidChangeManifest() |
| 826 { | 826 { |
| 827 if (m_webFrame->client()) | 827 if (m_webFrame->client()) |
| 828 m_webFrame->client()->didChangeManifest(m_webFrame); | 828 m_webFrame->client()->didChangeManifest(m_webFrame); |
| 829 } | 829 } |
| 830 | 830 |
| 831 } // namespace blink | 831 } // namespace blink |
| OLD | NEW |