Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 #include "core/editing/Editor.h" | 46 #include "core/editing/Editor.h" |
| 47 #include "core/events/DOMWindowEventQueue.h" | 47 #include "core/events/DOMWindowEventQueue.h" |
| 48 #include "core/events/HashChangeEvent.h" | 48 #include "core/events/HashChangeEvent.h" |
| 49 #include "core/events/MessageEvent.h" | 49 #include "core/events/MessageEvent.h" |
| 50 #include "core/events/PageTransitionEvent.h" | 50 #include "core/events/PageTransitionEvent.h" |
| 51 #include "core/events/PopStateEvent.h" | 51 #include "core/events/PopStateEvent.h" |
| 52 #include "core/events/ScopedEventQueue.h" | 52 #include "core/events/ScopedEventQueue.h" |
| 53 #include "core/frame/BarProp.h" | 53 #include "core/frame/BarProp.h" |
| 54 #include "core/frame/DOMVisualViewport.h" | 54 #include "core/frame/DOMVisualViewport.h" |
| 55 #include "core/frame/EventHandlerRegistry.h" | 55 #include "core/frame/EventHandlerRegistry.h" |
| 56 #include "core/frame/External.h" | |
| 56 #include "core/frame/FrameConsole.h" | 57 #include "core/frame/FrameConsole.h" |
| 57 #include "core/frame/FrameView.h" | 58 #include "core/frame/FrameView.h" |
| 58 #include "core/frame/History.h" | 59 #include "core/frame/History.h" |
| 59 #include "core/frame/LocalFrame.h" | 60 #include "core/frame/LocalFrame.h" |
| 60 #include "core/frame/Navigator.h" | 61 #include "core/frame/Navigator.h" |
| 61 #include "core/frame/Screen.h" | 62 #include "core/frame/Screen.h" |
| 62 #include "core/frame/ScrollToOptions.h" | 63 #include "core/frame/ScrollToOptions.h" |
| 63 #include "core/frame/Settings.h" | 64 #include "core/frame/Settings.h" |
| 64 #include "core/frame/SuspendableTimer.h" | 65 #include "core/frame/SuspendableTimer.h" |
| 65 #include "core/frame/VisualViewport.h" | 66 #include "core/frame/VisualViewport.h" |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1373 CustomElementRegistry* LocalDOMWindow::customElements() const { | 1374 CustomElementRegistry* LocalDOMWindow::customElements() const { |
| 1374 if (!m_customElements && m_document) | 1375 if (!m_customElements && m_document) |
| 1375 m_customElements = CustomElementRegistry::create(this); | 1376 m_customElements = CustomElementRegistry::create(this); |
| 1376 return m_customElements; | 1377 return m_customElements; |
| 1377 } | 1378 } |
| 1378 | 1379 |
| 1379 CustomElementRegistry* LocalDOMWindow::maybeCustomElements() const { | 1380 CustomElementRegistry* LocalDOMWindow::maybeCustomElements() const { |
| 1380 return m_customElements; | 1381 return m_customElements; |
| 1381 } | 1382 } |
| 1382 | 1383 |
| 1384 External* LocalDOMWindow::external() const { | |
|
haraken
2017/02/03 09:03:18
You'll need to rebase this part with ToT.
dcheng
2017/02/03 10:04:26
Done.
| |
| 1385 DEFINE_STATIC_LOCAL(Persistent<External>, external, (new External)); | |
| 1386 return external; | |
| 1387 } | |
| 1388 | |
| 1389 bool LocalDOMWindow::isSecureContext() const { | |
| 1390 if (!frame()) | |
| 1391 return false; | |
| 1392 | |
| 1393 return document()->isSecureContext( | |
| 1394 ExecutionContext::StandardSecureContextCheck); | |
| 1395 } | |
| 1396 | |
| 1383 void LocalDOMWindow::addedEventListener( | 1397 void LocalDOMWindow::addedEventListener( |
| 1384 const AtomicString& eventType, | 1398 const AtomicString& eventType, |
| 1385 RegisteredEventListener& registeredListener) { | 1399 RegisteredEventListener& registeredListener) { |
| 1386 DOMWindow::addedEventListener(eventType, registeredListener); | 1400 DOMWindow::addedEventListener(eventType, registeredListener); |
| 1387 if (frame() && frame()->host()) | 1401 if (frame() && frame()->host()) |
| 1388 frame()->host()->eventHandlerRegistry().didAddEventHandler( | 1402 frame()->host()->eventHandlerRegistry().didAddEventHandler( |
| 1389 *this, eventType, registeredListener.options()); | 1403 *this, eventType, registeredListener.options()); |
| 1390 | 1404 |
| 1391 if (Document* document = this->document()) | 1405 if (Document* document = this->document()) |
| 1392 document->addListenerTypeIfNeeded(eventType); | 1406 document->addListenerTypeIfNeeded(eventType); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1615 DOMWindow::trace(visitor); | 1629 DOMWindow::trace(visitor); |
| 1616 Supplementable<LocalDOMWindow>::trace(visitor); | 1630 Supplementable<LocalDOMWindow>::trace(visitor); |
| 1617 } | 1631 } |
| 1618 | 1632 |
| 1619 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { | 1633 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { |
| 1620 visitor->traceWrappers(m_customElements); | 1634 visitor->traceWrappers(m_customElements); |
| 1621 DOMWindow::traceWrappers(visitor); | 1635 DOMWindow::traceWrappers(visitor); |
| 1622 } | 1636 } |
| 1623 | 1637 |
| 1624 } // namespace blink | 1638 } // namespace blink |
| OLD | NEW |