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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 RefPtr<Frame> frame = Frame::create(m_overlayPage.get(), 0, dummyFrameLoader
Client); | 626 RefPtr<Frame> frame = Frame::create(m_overlayPage.get(), 0, dummyFrameLoader
Client); |
627 frame->setView(FrameView::create(frame.get())); | 627 frame->setView(FrameView::create(frame.get())); |
628 frame->init(); | 628 frame->init(); |
629 FrameLoader* loader = frame->loader(); | 629 FrameLoader* loader = frame->loader(); |
630 frame->view()->setCanHaveScrollbars(false); | 630 frame->view()->setCanHaveScrollbars(false); |
631 frame->view()->setTransparent(true); | 631 frame->view()->setTransparent(true); |
632 ASSERT(loader->activeDocumentLoader()); | 632 ASSERT(loader->activeDocumentLoader()); |
633 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("text/
html", "UTF-8"); | 633 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("text/
html", "UTF-8"); |
634 writer->addData(reinterpret_cast<const char*>(InspectorOverlayPage_html), si
zeof(InspectorOverlayPage_html)); | 634 writer->addData(reinterpret_cast<const char*>(InspectorOverlayPage_html), si
zeof(InspectorOverlayPage_html)); |
635 loader->activeDocumentLoader()->endWriting(writer); | 635 loader->activeDocumentLoader()->endWriting(writer); |
636 v8::Isolate* isolate = isolateForFrame(frame.get()); | 636 v8::Isolate* isolate = toIsolate(frame.get()); |
637 v8::HandleScope handleScope(isolate); | 637 v8::HandleScope handleScope(isolate); |
638 v8::Handle<v8::Context> frameContext = frame->script()->currentWorldContext(
); | 638 v8::Handle<v8::Context> frameContext = frame->script()->currentWorldContext(
); |
639 v8::Context::Scope contextScope(frameContext); | 639 v8::Context::Scope contextScope(frameContext); |
640 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle<
v8::Object>(), isolate); | 640 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle<
v8::Object>(), isolate); |
641 v8::Handle<v8::Object> global = frameContext->Global(); | 641 v8::Handle<v8::Object> global = frameContext->Global(); |
642 global->Set(v8::String::New("InspectorOverlayHost"), overlayHostObj); | 642 global->Set(v8::String::New("InspectorOverlayHost"), overlayHostObj); |
643 | 643 |
644 #if OS(WIN) | 644 #if OS(WIN) |
645 evaluateInOverlay("setPlatform", "windows"); | 645 evaluateInOverlay("setPlatform", "windows"); |
646 #elif OS(MACOSX) | 646 #elif OS(MACOSX) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 } | 693 } |
694 | 694 |
695 void InspectorOverlay::freePage() | 695 void InspectorOverlay::freePage() |
696 { | 696 { |
697 m_overlayPage.clear(); | 697 m_overlayPage.clear(); |
698 m_overlayChromeClient.clear(); | 698 m_overlayChromeClient.clear(); |
699 m_timer.stop(); | 699 m_timer.stop(); |
700 } | 700 } |
701 | 701 |
702 } // namespace WebCore | 702 } // namespace WebCore |
OLD | NEW |