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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 frame->init(); | 738 frame->init(); |
739 FrameLoader& loader = frame->loader(); | 739 FrameLoader& loader = frame->loader(); |
740 frame->view()->setCanHaveScrollbars(false); | 740 frame->view()->setCanHaveScrollbars(false); |
741 frame->view()->setTransparent(true); | 741 frame->view()->setTransparent(true); |
742 | 742 |
743 const blink::WebData& overlayPageHTMLResource = blink::Platform::current()->
loadResource("InspectorOverlayPage.html"); | 743 const blink::WebData& overlayPageHTMLResource = blink::Platform::current()->
loadResource("InspectorOverlayPage.html"); |
744 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat
a(), overlayPageHTMLResource.size()); | 744 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat
a(), overlayPageHTMLResource.size()); |
745 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); | 745 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); |
746 v8::Isolate* isolate = toIsolate(frame.get()); | 746 v8::Isolate* isolate = toIsolate(frame.get()); |
747 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); | 747 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); |
748 ASSERT(!scriptState->contextIsValid()); | 748 ASSERT(scriptState->contextIsValid()); |
749 ScriptState::Scope scope(scriptState); | 749 ScriptState::Scope scope(scriptState); |
750 v8::Handle<v8::Object> global = scriptState->context()->Global(); | 750 v8::Handle<v8::Object> global = scriptState->context()->Global(); |
751 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso
late); | 751 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso
late); |
752 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla
yHostObj); | 752 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla
yHostObj); |
753 | 753 |
754 #if OS(WIN) | 754 #if OS(WIN) |
755 evaluateInOverlay("setPlatform", "windows"); | 755 evaluateInOverlay("setPlatform", "windows"); |
756 #elif OS(MACOSX) | 756 #elif OS(MACOSX) |
757 evaluateInOverlay("setPlatform", "mac"); | 757 evaluateInOverlay("setPlatform", "mac"); |
758 #elif OS(POSIX) | 758 #elif OS(POSIX) |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 hideHighlight(); | 846 hideHighlight(); |
847 } | 847 } |
848 | 848 |
849 void InspectorOverlay::startedRecordingProfile() | 849 void InspectorOverlay::startedRecordingProfile() |
850 { | 850 { |
851 if (!m_activeProfilerCount++) | 851 if (!m_activeProfilerCount++) |
852 freePage(); | 852 freePage(); |
853 } | 853 } |
854 | 854 |
855 } // namespace blink | 855 } // namespace blink |
OLD | NEW |