| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 // through some non-composited paint function. | 365 // through some non-composited paint function. |
| 366 overlaySettings.setAcceleratedCompositingEnabled(false); | 366 overlaySettings.setAcceleratedCompositingEnabled(false); |
| 367 | 367 |
| 368 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderCl
ient, &m_overlayPage->frameHost(), 0); | 368 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderCl
ient, &m_overlayPage->frameHost(), 0); |
| 369 frame->setView(FrameView::create(frame.get())); | 369 frame->setView(FrameView::create(frame.get())); |
| 370 frame->init(); | 370 frame->init(); |
| 371 FrameLoader& loader = frame->loader(); | 371 FrameLoader& loader = frame->loader(); |
| 372 frame->view()->setCanHaveScrollbars(false); | 372 frame->view()->setCanHaveScrollbars(false); |
| 373 frame->view()->setTransparent(true); | 373 frame->view()->setTransparent(true); |
| 374 | 374 |
| 375 const blink::WebData& overlayPageHTMLResource = blink::Platform::current()->
loadResource("InspectorOverlayPage.html"); | 375 const WebData& overlayPageHTMLResource = Platform::current()->loadResource("
InspectorOverlayPage.html"); |
| 376 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat
a(), overlayPageHTMLResource.size()); | 376 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat
a(), overlayPageHTMLResource.size()); |
| 377 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); | 377 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); |
| 378 v8::Isolate* isolate = toIsolate(frame.get()); | 378 v8::Isolate* isolate = toIsolate(frame.get()); |
| 379 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); | 379 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); |
| 380 ASSERT(scriptState->contextIsValid()); | 380 ASSERT(scriptState->contextIsValid()); |
| 381 ScriptState::Scope scope(scriptState); | 381 ScriptState::Scope scope(scriptState); |
| 382 v8::Local<v8::Object> global = scriptState->context()->Global(); | 382 v8::Local<v8::Object> global = scriptState->context()->Global(); |
| 383 v8::Local<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, isol
ate); | 383 v8::Local<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, isol
ate); |
| 384 global->Set(v8AtomicString(isolate, "InspectorOverlayHost"), overlayHostObj)
; | 384 global->Set(v8AtomicString(isolate, "InspectorOverlayHost"), overlayHostObj)
; |
| 385 | 385 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 if (!m_suspendCount++) | 465 if (!m_suspendCount++) |
| 466 clear(); | 466 clear(); |
| 467 } | 467 } |
| 468 | 468 |
| 469 void InspectorOverlayImpl::resumeUpdates() | 469 void InspectorOverlayImpl::resumeUpdates() |
| 470 { | 470 { |
| 471 --m_suspendCount; | 471 --m_suspendCount; |
| 472 } | 472 } |
| 473 | 473 |
| 474 } // namespace blink | 474 } // namespace blink |
| OLD | NEW |