Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: Source/core/inspector/InspectorOverlay.cpp

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 overlaySettings.setAcceleratedCompositingEnabled(false); 705 overlaySettings.setAcceleratedCompositingEnabled(false);
706 706
707 RefPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderClient, &m_ove rlayPage->frameHost(), 0); 707 RefPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderClient, &m_ove rlayPage->frameHost(), 0);
708 frame->setView(FrameView::create(frame.get())); 708 frame->setView(FrameView::create(frame.get()));
709 frame->init(); 709 frame->init();
710 FrameLoader& loader = frame->loader(); 710 FrameLoader& loader = frame->loader();
711 frame->view()->setCanHaveScrollbars(false); 711 frame->view()->setCanHaveScrollbars(false);
712 frame->view()->setTransparent(true); 712 frame->view()->setTransparent(true);
713 713
714 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char *>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html)); 714 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char *>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html));
715 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html" , "UTF-8", KURL(), ForceSynchronousLoad))); 715 ResourceRequest request = ResourceRequest(blankURL());
716 request.initializeForMainResource(frame->isMainFrame());
717 loader.load(FrameLoadRequest(0, request, SubstituteData(data, "text/html", " UTF-8", KURL(), ForceSynchronousLoad)));
716 v8::Isolate* isolate = toIsolate(frame.get()); 718 v8::Isolate* isolate = toIsolate(frame.get());
717 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); 719 ScriptState* scriptState = ScriptState::forMainWorld(frame.get());
718 ASSERT(!scriptState->contextIsEmpty()); 720 ASSERT(!scriptState->contextIsEmpty());
719 ScriptState::Scope scope(scriptState); 721 ScriptState::Scope scope(scriptState);
720 v8::Handle<v8::Object> global = scriptState->context()->Global(); 722 v8::Handle<v8::Object> global = scriptState->context()->Global();
721 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso late); 723 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso late);
722 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla yHostObj); 724 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla yHostObj);
723 725
724 #if OS(WIN) 726 #if OS(WIN)
725 evaluateInOverlay("setPlatform", "windows"); 727 evaluateInOverlay("setPlatform", "windows");
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 hideHighlight(); 786 hideHighlight();
785 } 787 }
786 788
787 void InspectorOverlay::startedRecordingProfile() 789 void InspectorOverlay::startedRecordingProfile()
788 { 790 {
789 if (!m_activeProfilerCount++) 791 if (!m_activeProfilerCount++)
790 freePage(); 792 freePage();
791 } 793 }
792 794
793 } // namespace WebCore 795 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698