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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 frame->view()->setCanHaveScrollbars(false); | 719 frame->view()->setCanHaveScrollbars(false); |
720 frame->view()->setTransparent(true); | 720 frame->view()->setTransparent(true); |
721 | 721 |
722 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char
*>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html)); | 722 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char
*>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html)); |
723 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); | 723 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); |
724 v8::Isolate* isolate = toIsolate(frame.get()); | 724 v8::Isolate* isolate = toIsolate(frame.get()); |
725 v8::HandleScope handleScope(isolate); | 725 v8::HandleScope handleScope(isolate); |
726 v8::Handle<v8::Context> frameContext = toV8Context(isolate, frame.get(), DOM
WrapperWorld::mainWorld()); | 726 v8::Handle<v8::Context> frameContext = toV8Context(isolate, frame.get(), DOM
WrapperWorld::mainWorld()); |
727 ASSERT(!frameContext.IsEmpty()); | 727 ASSERT(!frameContext.IsEmpty()); |
728 v8::Context::Scope contextScope(frameContext); | 728 v8::Context::Scope contextScope(frameContext); |
729 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle<
v8::Object>(), isolate); | |
730 v8::Handle<v8::Object> global = frameContext->Global(); | 729 v8::Handle<v8::Object> global = frameContext->Global(); |
| 730 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso
late); |
731 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla
yHostObj); | 731 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla
yHostObj); |
732 | 732 |
733 #if OS(WIN) | 733 #if OS(WIN) |
734 evaluateInOverlay("setPlatform", "windows"); | 734 evaluateInOverlay("setPlatform", "windows"); |
735 #elif OS(MACOSX) | 735 #elif OS(MACOSX) |
736 evaluateInOverlay("setPlatform", "mac"); | 736 evaluateInOverlay("setPlatform", "mac"); |
737 #elif OS(POSIX) | 737 #elif OS(POSIX) |
738 evaluateInOverlay("setPlatform", "linux"); | 738 evaluateInOverlay("setPlatform", "linux"); |
739 #endif | 739 #endif |
740 | 740 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 hideHighlight(); | 797 hideHighlight(); |
798 } | 798 } |
799 | 799 |
800 void InspectorOverlay::startedRecordingProfile() | 800 void InspectorOverlay::startedRecordingProfile() |
801 { | 801 { |
802 if (!m_activeProfilerCount++) | 802 if (!m_activeProfilerCount++) |
803 freePage(); | 803 freePage(); |
804 } | 804 } |
805 | 805 |
806 } // namespace WebCore | 806 } // namespace WebCore |
OLD | NEW |