|
Lines 108-124
void WebInspectorProxy::invalidate()
a/Source/WebKit2/UIProcess/WebInspectorProxy.cpp_sec1
|
| 108 |
WebInspectorServer::singleton().unregisterPage(m_remoteInspectionPageId); |
108 |
WebInspectorServer::singleton().unregisterPage(m_remoteInspectionPageId); |
| 109 |
#endif |
109 |
#endif |
| 110 |
|
110 |
|
| 111 |
// We can be called reentrantly through platformInvalidate(), in which case nothing needs to be done. |
|
|
| 112 |
if (!m_inspectedPage) |
| 113 |
return; |
| 114 |
|
| 115 |
m_inspectedPage->process().removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID()); |
111 |
m_inspectedPage->process().removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID()); |
| 116 |
|
112 |
|
| 117 |
pageLevelMap().remove(m_inspectedPage); |
|
|
| 118 |
m_inspectedPage = nullptr; |
| 119 |
|
| 120 |
didClose(); |
113 |
didClose(); |
| 121 |
platformInvalidate(); |
114 |
platformInvalidate(); |
|
|
115 |
|
| 116 |
pageLevelMap().remove(m_inspectedPage); |
| 117 |
m_inspectedPage = nullptr; |
| 122 |
} |
118 |
} |
| 123 |
|
119 |
|
| 124 |
// Public APIs |
120 |
// Public APIs |
|
Lines 184-191
void WebInspectorProxy::close()
a/Source/WebKit2/UIProcess/WebInspectorProxy.cpp_sec2
|
| 184 |
|
180 |
|
| 185 |
void WebInspectorProxy::didRelaunchInspectorPageProcess() |
181 |
void WebInspectorProxy::didRelaunchInspectorPageProcess() |
| 186 |
{ |
182 |
{ |
| 187 |
if (inspectionLevel() == 1) |
183 |
m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID(), *this); |
| 188 |
m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID(), *this); |
|
|
| 189 |
m_inspectorPage->process().assumeReadAccessToBaseURL(WebInspectorProxy::inspectorBaseURL()); |
184 |
m_inspectorPage->process().assumeReadAccessToBaseURL(WebInspectorProxy::inspectorBaseURL()); |
| 190 |
|
185 |
|
| 191 |
// When didRelaunchInspectorPageProcess is called we can assume it is during a load request. |
186 |
// When didRelaunchInspectorPageProcess is called we can assume it is during a load request. |
|
Lines 515-522
void WebInspectorProxy::eagerlyCreateInspectorPage()
a/Source/WebKit2/UIProcess/WebInspectorProxy.cpp_sec3
|
| 515 |
WKPageSetPageLoaderClient(toAPI(m_inspectorPage), &loaderClient.base); |
510 |
WKPageSetPageLoaderClient(toAPI(m_inspectorPage), &loaderClient.base); |
| 516 |
WKPageSetPageContextMenuClient(toAPI(m_inspectorPage), &contextMenuClient.base); |
511 |
WKPageSetPageContextMenuClient(toAPI(m_inspectorPage), &contextMenuClient.base); |
| 517 |
|
512 |
|
| 518 |
if (inspectionLevel() == 1) |
513 |
m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID(), *this); |
| 519 |
m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID(), *this); |
|
|
| 520 |
m_inspectorPage->process().assumeReadAccessToBaseURL(WebInspectorProxy::inspectorBaseURL()); |
514 |
m_inspectorPage->process().assumeReadAccessToBaseURL(WebInspectorProxy::inspectorBaseURL()); |
| 521 |
} |
515 |
} |
| 522 |
|
516 |
|
|
Lines 578-586
void WebInspectorProxy::didClose()
a/Source/WebKit2/UIProcess/WebInspectorProxy.cpp_sec4
|
| 578 |
if (!m_inspectorPage) |
572 |
if (!m_inspectorPage) |
| 579 |
return; |
573 |
return; |
| 580 |
|
574 |
|
| 581 |
if (inspectionLevel() == 1) |
575 |
m_inspectorPage->process().removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID()); |
| 582 |
m_inspectorPage->process().removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectorPage->pageID()); |
|
|
| 583 |
|
| 584 |
m_inspectorPage = nullptr; |
576 |
m_inspectorPage = nullptr; |
| 585 |
|
577 |
|
| 586 |
m_isVisible = false; |
578 |
m_isVisible = false; |