| 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 overlaySettings.setAcceleratedCompositingEnabled(false); | 706 overlaySettings.setAcceleratedCompositingEnabled(false); |
| 707 | 707 |
| 708 RefPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderClient, &m_ove
rlayPage->frameHost(), 0); | 708 RefPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderClient, &m_ove
rlayPage->frameHost(), 0); |
| 709 frame->setView(FrameView::create(frame.get())); | 709 frame->setView(FrameView::create(frame.get())); |
| 710 frame->init(); | 710 frame->init(); |
| 711 FrameLoader& loader = frame->loader(); | 711 FrameLoader& loader = frame->loader(); |
| 712 frame->view()->setCanHaveScrollbars(false); | 712 frame->view()->setCanHaveScrollbars(false); |
| 713 frame->view()->setTransparent(true); | 713 frame->view()->setTransparent(true); |
| 714 | 714 |
| 715 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char
*>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html)); | 715 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char
*>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html)); |
| 716 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); | 716 ResourceRequest request = ResourceRequest::createMainResourceRequest(blankUR
L(), frame->isMainFrame()); |
| 717 loader.load(FrameLoadRequest(0, request, SubstituteData(data, "text/html", "
UTF-8", KURL(), ForceSynchronousLoad))); |
| 717 v8::Isolate* isolate = toIsolate(frame.get()); | 718 v8::Isolate* isolate = toIsolate(frame.get()); |
| 718 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); | 719 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); |
| 719 ASSERT(!scriptState->contextIsEmpty()); | 720 ASSERT(!scriptState->contextIsEmpty()); |
| 720 ScriptState::Scope scope(scriptState); | 721 ScriptState::Scope scope(scriptState); |
| 721 v8::Handle<v8::Object> global = scriptState->context()->Global(); | 722 v8::Handle<v8::Object> global = scriptState->context()->Global(); |
| 722 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso
late); | 723 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso
late); |
| 723 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla
yHostObj); | 724 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla
yHostObj); |
| 724 | 725 |
| 725 #if OS(WIN) | 726 #if OS(WIN) |
| 726 evaluateInOverlay("setPlatform", "windows"); | 727 evaluateInOverlay("setPlatform", "windows"); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 hideHighlight(); | 786 hideHighlight(); |
| 786 } | 787 } |
| 787 | 788 |
| 788 void InspectorOverlay::startedRecordingProfile() | 789 void InspectorOverlay::startedRecordingProfile() |
| 789 { | 790 { |
| 790 if (!m_activeProfilerCount++) | 791 if (!m_activeProfilerCount++) |
| 791 freePage(); | 792 freePage(); |
| 792 } | 793 } |
| 793 | 794 |
| 794 } // namespace WebCore | 795 } // namespace WebCore |
| OLD | NEW |