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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 frame->view()->setCanHaveScrollbars(false); | 752 frame->view()->setCanHaveScrollbars(false); |
753 frame->view()->setTransparent(true); | 753 frame->view()->setTransparent(true); |
754 | 754 |
755 const blink::WebData& overlayPageHTMLResource = blink::Platform::current()->
loadResource("InspectorOverlayPage.html"); | 755 const blink::WebData& overlayPageHTMLResource = blink::Platform::current()->
loadResource("InspectorOverlayPage.html"); |
756 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat
a(), overlayPageHTMLResource.size()); | 756 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat
a(), overlayPageHTMLResource.size()); |
757 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); | 757 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); |
758 v8::Isolate* isolate = toIsolate(frame.get()); | 758 v8::Isolate* isolate = toIsolate(frame.get()); |
759 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); | 759 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); |
760 ASSERT(scriptState->contextIsValid()); | 760 ASSERT(scriptState->contextIsValid()); |
761 ScriptState::Scope scope(scriptState); | 761 ScriptState::Scope scope(scriptState); |
762 v8::Handle<v8::Object> global = scriptState->context()->Global(); | 762 v8::Local<v8::Object> global = scriptState->context()->Global(); |
763 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso
late); | 763 v8::Local<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, isol
ate); |
764 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla
yHostObj); | 764 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla
yHostObj); |
765 | 765 |
766 #if OS(WIN) | 766 #if OS(WIN) |
767 evaluateInOverlay("setPlatform", "windows"); | 767 evaluateInOverlay("setPlatform", "windows"); |
768 #elif OS(MACOSX) | 768 #elif OS(MACOSX) |
769 evaluateInOverlay("setPlatform", "mac"); | 769 evaluateInOverlay("setPlatform", "mac"); |
770 #elif OS(POSIX) | 770 #elif OS(POSIX) |
771 evaluateInOverlay("setPlatform", "linux"); | 771 evaluateInOverlay("setPlatform", "linux"); |
772 #endif | 772 #endif |
773 | 773 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 hideHighlight(); | 878 hideHighlight(); |
879 } | 879 } |
880 | 880 |
881 void InspectorOverlay::startedRecordingProfile() | 881 void InspectorOverlay::startedRecordingProfile() |
882 { | 882 { |
883 if (!m_activeProfilerCount++) | 883 if (!m_activeProfilerCount++) |
884 freePage(); | 884 freePage(); |
885 } | 885 } |
886 | 886 |
887 } // namespace blink | 887 } // namespace blink |
OLD | NEW |