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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2790313004: Move ScriptState::domWindow() (Closed)
Patch Set: Rebase again Created 3 years, 8 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) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 document = DOMImplementation::createDocument( 321 document = DOMImplementation::createDocument(
322 mimeType, init, 322 mimeType, init,
323 init.frame() ? init.frame()->inViewSourceMode() : false); 323 init.frame() ? init.frame()->inViewSourceMode() : false);
324 if (document->isPluginDocument() && document->isSandboxed(SandboxPlugins)) 324 if (document->isPluginDocument() && document->isSandboxed(SandboxPlugins))
325 document = SinkDocument::create(init); 325 document = SinkDocument::create(init);
326 } 326 }
327 327
328 return document; 328 return document;
329 } 329 }
330 330
331 LocalDOMWindow* LocalDOMWindow::from(const ScriptState* scriptState) {
332 v8::HandleScope scope(scriptState->isolate());
333 return blink::toLocalDOMWindow(scriptState->context());
334 }
335
331 Document* LocalDOMWindow::installNewDocument(const String& mimeType, 336 Document* LocalDOMWindow::installNewDocument(const String& mimeType,
332 const DocumentInit& init, 337 const DocumentInit& init,
333 bool forceXHTML) { 338 bool forceXHTML) {
334 ASSERT(init.frame() == frame()); 339 ASSERT(init.frame() == frame());
335 340
336 clearDocument(); 341 clearDocument();
337 342
338 m_document = createDocument(mimeType, init, forceXHTML); 343 m_document = createDocument(mimeType, init, forceXHTML);
339 m_eventQueue = DOMWindowEventQueue::create(m_document.get()); 344 m_eventQueue = DOMWindowEventQueue::create(m_document.get());
340 m_document->initialize(); 345 m_document->initialize();
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 DOMWindow::trace(visitor); 1652 DOMWindow::trace(visitor);
1648 Supplementable<LocalDOMWindow>::trace(visitor); 1653 Supplementable<LocalDOMWindow>::trace(visitor);
1649 } 1654 }
1650 1655
1651 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1656 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1652 visitor->traceWrappers(m_customElements); 1657 visitor->traceWrappers(m_customElements);
1653 DOMWindow::traceWrappers(visitor); 1658 DOMWindow::traceWrappers(visitor);
1654 } 1659 }
1655 1660
1656 } // namespace blink 1661 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/modules/payments/PaymentRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698