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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 LocalFrame::Create(&dummy_local_frame_client, *overlay_page_, 0); | 551 LocalFrame::Create(&dummy_local_frame_client, *overlay_page_, 0); |
552 frame->SetView(FrameView::Create(*frame)); | 552 frame->SetView(FrameView::Create(*frame)); |
553 frame->Init(); | 553 frame->Init(); |
554 FrameLoader& loader = frame->Loader(); | 554 FrameLoader& loader = frame->Loader(); |
555 frame->View()->SetCanHaveScrollbars(false); | 555 frame->View()->SetCanHaveScrollbars(false); |
556 frame->View()->SetBaseBackgroundColor(Color::kTransparent); | 556 frame->View()->SetBaseBackgroundColor(Color::kTransparent); |
557 | 557 |
558 const WebData& overlay_page_html_resource = | 558 const WebData& overlay_page_html_resource = |
559 Platform::Current()->LoadResource("InspectorOverlayPage.html"); | 559 Platform::Current()->LoadResource("InspectorOverlayPage.html"); |
560 loader.Load( | 560 loader.Load( |
561 FrameLoadRequest(0, BlankURL(), | 561 FrameLoadRequest(0, ResourceRequest(BlankURL()), |
562 SubstituteData(overlay_page_html_resource, "text/html", | 562 SubstituteData(overlay_page_html_resource, "text/html", |
563 "UTF-8", KURL(), kForceSynchronousLoad))); | 563 "UTF-8", KURL(), kForceSynchronousLoad))); |
564 v8::Isolate* isolate = ToIsolate(frame); | 564 v8::Isolate* isolate = ToIsolate(frame); |
565 ScriptState* script_state = ToScriptStateForMainWorld(frame); | 565 ScriptState* script_state = ToScriptStateForMainWorld(frame); |
566 DCHECK(script_state); | 566 DCHECK(script_state); |
567 ScriptState::Scope scope(script_state); | 567 ScriptState::Scope scope(script_state); |
568 v8::Local<v8::Object> global = script_state->GetContext()->Global(); | 568 v8::Local<v8::Object> global = script_state->GetContext()->Global(); |
569 v8::Local<v8::Value> overlay_host_obj = | 569 v8::Local<v8::Value> overlay_host_obj = |
570 ToV8(overlay_host_.Get(), global, isolate); | 570 ToV8(overlay_host_.Get(), global, isolate); |
571 DCHECK(!overlay_host_obj.IsEmpty()); | 571 DCHECK(!overlay_host_obj.IsEmpty()); |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 bool InspectorOverlay::ShouldSearchForNode() { | 805 bool InspectorOverlay::ShouldSearchForNode() { |
806 return inspect_mode_ != InspectorDOMAgent::kNotSearching; | 806 return inspect_mode_ != InspectorDOMAgent::kNotSearching; |
807 } | 807 } |
808 | 808 |
809 void InspectorOverlay::Inspect(Node* node) { | 809 void InspectorOverlay::Inspect(Node* node) { |
810 if (dom_agent_) | 810 if (dom_agent_) |
811 dom_agent_->Inspect(node); | 811 dom_agent_->Inspect(node); |
812 } | 812 } |
813 | 813 |
814 } // namespace blink | 814 } // namespace blink |
OLD | NEW |