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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #include "WebNode.h" | 56 #include "WebNode.h" |
57 #include "WebPlugin.h" | 57 #include "WebPlugin.h" |
58 #include "WebPluginParams.h" | 58 #include "WebPluginParams.h" |
59 #include "WebSecurityOrigin.h" | 59 #include "WebSecurityOrigin.h" |
60 #include "WebURL.h" | 60 #include "WebURL.h" |
61 #include "WebURLError.h" | 61 #include "WebURLError.h" |
62 #include "WebVector.h" | 62 #include "WebVector.h" |
63 #include "WebViewClient.h" | 63 #include "WebViewClient.h" |
64 #include "WebViewImpl.h" | 64 #include "WebViewImpl.h" |
65 #include "WebDataSourceImpl.h" | 65 #include "WebDataSourceImpl.h" |
| 66 #include "WebDevToolsAgentPrivate.h" |
66 #include "WebPluginContainerImpl.h" | 67 #include "WebPluginContainerImpl.h" |
67 #include "WebPluginLoadObserver.h" | 68 #include "WebPluginLoadObserver.h" |
68 #include "WindowFeatures.h" | 69 #include "WindowFeatures.h" |
69 #include "WrappedResourceRequest.h" | 70 #include "WrappedResourceRequest.h" |
70 #include "WrappedResourceResponse.h" | 71 #include "WrappedResourceResponse.h" |
71 | 72 |
72 // FIXME: remove these | 73 // FIXME: remove these |
73 #include "net/base/mime_util.h" | 74 #include "net/base/mime_util.h" |
74 #include "webkit/glue/webdevtoolsagent_impl.h" | |
75 | 75 |
76 using namespace WebCore; | 76 using namespace WebCore; |
77 | 77 |
78 namespace WebKit { | 78 namespace WebKit { |
79 | 79 |
80 // Domain for internal error codes. | 80 // Domain for internal error codes. |
81 static const char internalErrorDomain[] = "WebKit"; | 81 static const char internalErrorDomain[] = "WebKit"; |
82 | 82 |
83 // An internal error code. Used to note a policy change error resulting from | 83 // An internal error code. Used to note a policy change error resulting from |
84 // dispatchDecidePolicyForMIMEType not passing the PolicyUse option. | 84 // dispatchDecidePolicyForMIMEType not passing the PolicyUse option. |
(...skipping 21 matching lines...) Expand all Loading... |
106 m_webFrame->closing(); | 106 m_webFrame->closing(); |
107 m_webFrame->deref(); | 107 m_webFrame->deref(); |
108 } | 108 } |
109 | 109 |
110 void FrameLoaderClientImpl::windowObjectCleared() | 110 void FrameLoaderClientImpl::windowObjectCleared() |
111 { | 111 { |
112 if (m_webFrame->client()) | 112 if (m_webFrame->client()) |
113 m_webFrame->client()->didClearWindowObject(m_webFrame); | 113 m_webFrame->client()->didClearWindowObject(m_webFrame); |
114 | 114 |
115 WebViewImpl* webview = m_webFrame->viewImpl(); | 115 WebViewImpl* webview = m_webFrame->viewImpl(); |
116 if (webview) { | 116 if (webview->devToolsAgentPrivate()) |
117 WebDevToolsAgentImpl* toolsAgent = webview->devToolsAgentImpl(); | 117 webview->devToolsAgentPrivate()->didClearWindowObject(m_webFrame); |
118 if (toolsAgent) | |
119 toolsAgent->WindowObjectCleared(m_webFrame); | |
120 } | |
121 } | 118 } |
122 | 119 |
123 void FrameLoaderClientImpl::documentElementAvailable() | 120 void FrameLoaderClientImpl::documentElementAvailable() |
124 { | 121 { |
125 if (m_webFrame->client()) | 122 if (m_webFrame->client()) |
126 m_webFrame->client()->didCreateDocumentElement(m_webFrame); | 123 m_webFrame->client()->didCreateDocumentElement(m_webFrame); |
127 } | 124 } |
128 | 125 |
129 void FrameLoaderClientImpl::didCreateScriptContextForFrame() | 126 void FrameLoaderClientImpl::didCreateScriptContextForFrame() |
130 { | 127 { |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 | 643 |
647 void FrameLoaderClientImpl::dispatchDidCommitLoad() | 644 void FrameLoaderClientImpl::dispatchDidCommitLoad() |
648 { | 645 { |
649 WebViewImpl* webview = m_webFrame->viewImpl(); | 646 WebViewImpl* webview = m_webFrame->viewImpl(); |
650 bool isNewNavigation; | 647 bool isNewNavigation; |
651 webview->didCommitLoad(&isNewNavigation); | 648 webview->didCommitLoad(&isNewNavigation); |
652 | 649 |
653 if (m_webFrame->client()) | 650 if (m_webFrame->client()) |
654 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, isNewNavigation); | 651 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, isNewNavigation); |
655 | 652 |
656 WebDevToolsAgentImpl* toolsAgent = webview->devToolsAgentImpl(); | 653 if (webview->devToolsAgentPrivate()) |
657 if (toolsAgent) | 654 webview->devToolsAgentPrivate()->didCommitProvisionalLoad(m_webFrame, isNewNavigation); |
658 toolsAgent->DidCommitLoadForFrame(webview, m_webFrame, isNewNavigation); | |
659 } | 655 } |
660 | 656 |
661 void FrameLoaderClientImpl::dispatchDidFailProvisionalLoad( | 657 void FrameLoaderClientImpl::dispatchDidFailProvisionalLoad( |
662 const ResourceError& error) | 658 const ResourceError& error) |
663 { | 659 { |
664 | 660 |
665 // If a policy change occured, then we do not want to inform the plugin | 661 // If a policy change occured, then we do not want to inform the plugin |
666 // delegate. See http://b/907789 for details. FIXME: This means the | 662 // delegate. See http://b/907789 for details. FIXME: This means the |
667 // plugin won't receive NPP_URLNotify, which seems like it could result in | 663 // plugin won't receive NPP_URLNotify, which seems like it could result in |
668 // a memory leak in the plugin!! | 664 // a memory leak in the plugin!! |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 } | 1397 } |
1402 | 1398 |
1403 PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver() | 1399 PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver() |
1404 { | 1400 { |
1405 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader( | 1401 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader( |
1406 m_webFrame->frame()->loader()->activeDocumentLoader()); | 1402 m_webFrame->frame()->loader()->activeDocumentLoader()); |
1407 return ds->releasePluginLoadObserver(); | 1403 return ds->releasePluginLoadObserver(); |
1408 } | 1404 } |
1409 | 1405 |
1410 } // namespace WebKit | 1406 } // namespace WebKit |
OLD | NEW |