| 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 | 598 |
| 599 RefPtr<Frame> frame = Frame::create(m_overlayPage.get(), 0, dummyFrameLoader
Client); | 599 RefPtr<Frame> frame = Frame::create(m_overlayPage.get(), 0, dummyFrameLoader
Client); |
| 600 frame->setView(FrameView::create(frame.get())); | 600 frame->setView(FrameView::create(frame.get())); |
| 601 frame->init(); | 601 frame->init(); |
| 602 FrameLoader* loader = frame->loader(); | 602 FrameLoader* loader = frame->loader(); |
| 603 frame->view()->setCanHaveScrollbars(false); | 603 frame->view()->setCanHaveScrollbars(false); |
| 604 frame->view()->setTransparent(true); | 604 frame->view()->setTransparent(true); |
| 605 ASSERT(loader->activeDocumentLoader()); | 605 ASSERT(loader->activeDocumentLoader()); |
| 606 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("text/
html", "UTF-8"); | 606 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("text/
html", "UTF-8"); |
| 607 writer->addData(reinterpret_cast<const char*>(InspectorOverlayPage_html), si
zeof(InspectorOverlayPage_html)); | 607 writer->addData(reinterpret_cast<const char*>(InspectorOverlayPage_html), si
zeof(InspectorOverlayPage_html)); |
| 608 writer->end(); | 608 loader->activeDocumentLoader()->endWriting(writer); |
| 609 v8::HandleScope handleScope; | 609 v8::HandleScope handleScope; |
| 610 v8::Handle<v8::Context> frameContext = frame->script()->currentWorldContext(
); | 610 v8::Handle<v8::Context> frameContext = frame->script()->currentWorldContext(
); |
| 611 v8::Context::Scope contextScope(frameContext); | 611 v8::Context::Scope contextScope(frameContext); |
| 612 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle<
v8::Object>(), frameContext->GetIsolate()); | 612 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle<
v8::Object>(), frameContext->GetIsolate()); |
| 613 v8::Handle<v8::Object> global = frameContext->Global(); | 613 v8::Handle<v8::Object> global = frameContext->Global(); |
| 614 global->Set(v8::String::New("InspectorOverlayHost"), overlayHostObj); | 614 global->Set(v8::String::New("InspectorOverlayHost"), overlayHostObj); |
| 615 | 615 |
| 616 #if OS(WINDOWS) | 616 #if OS(WINDOWS) |
| 617 evaluateInOverlay("setPlatform", "windows"); | 617 evaluateInOverlay("setPlatform", "windows"); |
| 618 #elif OS(DARWIN) | 618 #elif OS(DARWIN) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 | 675 |
| 676 void InspectorOverlay::freePage() | 676 void InspectorOverlay::freePage() |
| 677 { | 677 { |
| 678 m_overlayPage.clear(); | 678 m_overlayPage.clear(); |
| 679 m_overlayChromeClient.clear(); | 679 m_overlayChromeClient.clear(); |
| 680 m_timer.stop(); | 680 m_timer.stop(); |
| 681 } | 681 } |
| 682 | 682 |
| 683 } // namespace WebCore | 683 } // namespace WebCore |
| 684 | 684 |
| OLD | NEW |