| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 LocalFrame* frame = | 547 LocalFrame* frame = |
| 548 LocalFrame::create(&dummyLocalFrameClient, *m_overlayPage, 0); | 548 LocalFrame::create(&dummyLocalFrameClient, *m_overlayPage, 0); |
| 549 frame->setView(FrameView::create(*frame)); | 549 frame->setView(FrameView::create(*frame)); |
| 550 frame->init(); | 550 frame->init(); |
| 551 FrameLoader& loader = frame->loader(); | 551 FrameLoader& loader = frame->loader(); |
| 552 frame->view()->setCanHaveScrollbars(false); | 552 frame->view()->setCanHaveScrollbars(false); |
| 553 frame->view()->setTransparent(true); | 553 frame->view()->setTransparent(true); |
| 554 | 554 |
| 555 const WebData& overlayPageHTMLResource = | 555 const WebData& overlayPageHTMLResource = |
| 556 Platform::current()->loadResource("InspectorOverlayPage.html"); | 556 Platform::current()->loadResource("InspectorOverlayPage.html"); |
| 557 RefPtr<SharedBuffer> data = SharedBuffer::create( | 557 loader.load( |
| 558 overlayPageHTMLResource.data(), overlayPageHTMLResource.size()); | 558 FrameLoadRequest(0, blankURL(), |
| 559 loader.load(FrameLoadRequest( | 559 SubstituteData(overlayPageHTMLResource, "text/html", |
| 560 0, blankURL(), SubstituteData(data, "text/html", "UTF-8", KURL(), | 560 "UTF-8", KURL(), ForceSynchronousLoad))); |
| 561 ForceSynchronousLoad))); | |
| 562 v8::Isolate* isolate = toIsolate(frame); | 561 v8::Isolate* isolate = toIsolate(frame); |
| 563 ScriptState* scriptState = ScriptState::forMainWorld(frame); | 562 ScriptState* scriptState = ScriptState::forMainWorld(frame); |
| 564 DCHECK(scriptState); | 563 DCHECK(scriptState); |
| 565 ScriptState::Scope scope(scriptState); | 564 ScriptState::Scope scope(scriptState); |
| 566 v8::Local<v8::Object> global = scriptState->context()->Global(); | 565 v8::Local<v8::Object> global = scriptState->context()->Global(); |
| 567 v8::Local<v8::Value> overlayHostObj = | 566 v8::Local<v8::Value> overlayHostObj = |
| 568 ToV8(m_overlayHost.get(), global, isolate); | 567 ToV8(m_overlayHost.get(), global, isolate); |
| 569 DCHECK(!overlayHostObj.IsEmpty()); | 568 DCHECK(!overlayHostObj.IsEmpty()); |
| 570 global | 569 global |
| 571 ->Set(scriptState->context(), | 570 ->Set(scriptState->context(), |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 bool InspectorOverlay::shouldSearchForNode() { | 801 bool InspectorOverlay::shouldSearchForNode() { |
| 803 return m_inspectMode != InspectorDOMAgent::NotSearching; | 802 return m_inspectMode != InspectorDOMAgent::NotSearching; |
| 804 } | 803 } |
| 805 | 804 |
| 806 void InspectorOverlay::inspect(Node* node) { | 805 void InspectorOverlay::inspect(Node* node) { |
| 807 if (m_domAgent) | 806 if (m_domAgent) |
| 808 m_domAgent->inspect(node); | 807 m_domAgent->inspect(node); |
| 809 } | 808 } |
| 810 | 809 |
| 811 } // namespace blink | 810 } // namespace blink |
| OLD | NEW |