Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Internals::openDummyInspectorFrontend()
- {
- Page* page = contextDocument()->frame()->page();
- if (!page)
- return false;
- Page::PageClients pc;
- fillWithEmptyClients(pc);
- m_frontendPage = adoptPtr(new Page(pc));
- RefPtr<Frame> mainFrame = Frame::create(m_frontendPage.get(), 0, new EmptyFrameLoaderClient());
- PassRefPtr<FrameView> frameView = FrameView::create(mainFrame.get());
- mainFrame->setView(frameView);
- mainFrame->init();
- KURL inspectorProtocolVerifierURL( WebCore::ParsedURLString, "http://localhost:8000/inspector-protocol/resources/inspector-protocol.html");
- m_frontendPage->mainFrame()->loader()->load(ResourceRequest(inspectorProtocolVerifierURL), false);
- OwnPtr<InspectorFrontendClientDummy> frontendClient = adoptPtr(new InspectorFrontendClientDummy(page->inspectorController(), page, adoptPtr(new InspectorFrontendClientLocal::Settings())));
- m_frontendPage->inspectorController()->setInspectorFrontendClient(frontendClient.release());
- InspectorFrontendChannelDummy* channel = new InspectorFrontendChannelDummy(m_frontendPage.get());
- m_frontendPage->inspectorController()->connectFrontend(channel);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement