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

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: Switched to constructors 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
« no previous file with comments | « Source/core/html/HTMLAnchorElement.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 overlaySettings.setAcceleratedCompositingEnabled(false); 706 overlaySettings.setAcceleratedCompositingEnabled(false);
707 707
708 RefPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderClient, &m_ove rlayPage->frameHost(), 0); 708 RefPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderClient, &m_ove rlayPage->frameHost(), 0);
709 frame->setView(FrameView::create(frame.get())); 709 frame->setView(FrameView::create(frame.get()));
710 frame->init(); 710 frame->init();
711 FrameLoader& loader = frame->loader(); 711 FrameLoader& loader = frame->loader();
712 frame->view()->setCanHaveScrollbars(false); 712 frame->view()->setCanHaveScrollbars(false);
713 frame->view()->setTransparent(true); 713 frame->view()->setTransparent(true);
714 714
715 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char *>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html)); 715 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char *>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html));
716 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html" , "UTF-8", KURL(), ForceSynchronousLoad))); 716 ResourceRequest request = ResourceRequest(blankURL(), frame->isMainFrame());
717 loader.load(FrameLoadRequest(0, request, SubstituteData(data, "text/html", " UTF-8", KURL(), ForceSynchronousLoad)));
717 v8::Isolate* isolate = toIsolate(frame.get()); 718 v8::Isolate* isolate = toIsolate(frame.get());
718 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); 719 ScriptState* scriptState = ScriptState::forMainWorld(frame.get());
719 ASSERT(!scriptState->contextIsEmpty()); 720 ASSERT(!scriptState->contextIsEmpty());
720 ScriptState::Scope scope(scriptState); 721 ScriptState::Scope scope(scriptState);
721 v8::Handle<v8::Object> global = scriptState->context()->Global(); 722 v8::Handle<v8::Object> global = scriptState->context()->Global();
722 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);
723 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla yHostObj); 724 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla yHostObj);
724 725
725 #if OS(WIN) 726 #if OS(WIN)
726 evaluateInOverlay("setPlatform", "windows"); 727 evaluateInOverlay("setPlatform", "windows");
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 hideHighlight(); 786 hideHighlight();
786 } 787 }
787 788
788 void InspectorOverlay::startedRecordingProfile() 789 void InspectorOverlay::startedRecordingProfile()
789 { 790 {
790 if (!m_activeProfilerCount++) 791 if (!m_activeProfilerCount++)
791 freePage(); 792 freePage();
792 } 793 }
793 794
794 } // namespace WebCore 795 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAnchorElement.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698