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

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

Issue 2277713002: Rename CustomElementsRegistry to CustomElementRegistry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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 21 matching lines...) Expand all
32 #include "core/css/CSSRuleList.h" 32 #include "core/css/CSSRuleList.h"
33 #include "core/css/DOMWindowCSS.h" 33 #include "core/css/DOMWindowCSS.h"
34 #include "core/css/MediaQueryList.h" 34 #include "core/css/MediaQueryList.h"
35 #include "core/css/MediaQueryMatcher.h" 35 #include "core/css/MediaQueryMatcher.h"
36 #include "core/css/StyleMedia.h" 36 #include "core/css/StyleMedia.h"
37 #include "core/css/resolver/StyleResolver.h" 37 #include "core/css/resolver/StyleResolver.h"
38 #include "core/dom/DOMImplementation.h" 38 #include "core/dom/DOMImplementation.h"
39 #include "core/dom/ExecutionContextTask.h" 39 #include "core/dom/ExecutionContextTask.h"
40 #include "core/dom/FrameRequestCallback.h" 40 #include "core/dom/FrameRequestCallback.h"
41 #include "core/dom/SandboxFlags.h" 41 #include "core/dom/SandboxFlags.h"
42 #include "core/dom/custom/CustomElementsRegistry.h" 42 #include "core/dom/custom/CustomElementRegistry.h"
43 #include "core/editing/Editor.h" 43 #include "core/editing/Editor.h"
44 #include "core/events/DOMWindowEventQueue.h" 44 #include "core/events/DOMWindowEventQueue.h"
45 #include "core/events/HashChangeEvent.h" 45 #include "core/events/HashChangeEvent.h"
46 #include "core/events/MessageEvent.h" 46 #include "core/events/MessageEvent.h"
47 #include "core/events/PageTransitionEvent.h" 47 #include "core/events/PageTransitionEvent.h"
48 #include "core/events/PopStateEvent.h" 48 #include "core/events/PopStateEvent.h"
49 #include "core/events/ScopedEventQueue.h" 49 #include "core/events/ScopedEventQueue.h"
50 #include "core/frame/BarProp.h" 50 #include "core/frame/BarProp.h"
51 #include "core/frame/DOMVisualViewport.h" 51 #include "core/frame/DOMVisualViewport.h"
52 #include "core/frame/EventHandlerRegistry.h" 52 #include "core/frame/EventHandlerRegistry.h"
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 return document->requestIdleCallback(callback, options); 1311 return document->requestIdleCallback(callback, options);
1312 return 0; 1312 return 0;
1313 } 1313 }
1314 1314
1315 void LocalDOMWindow::cancelIdleCallback(int id) 1315 void LocalDOMWindow::cancelIdleCallback(int id)
1316 { 1316 {
1317 if (Document* document = this->document()) 1317 if (Document* document = this->document())
1318 document->cancelIdleCallback(id); 1318 document->cancelIdleCallback(id);
1319 } 1319 }
1320 1320
1321 CustomElementsRegistry* LocalDOMWindow::customElements(ScriptState* scriptState) const 1321 CustomElementRegistry* LocalDOMWindow::customElements(ScriptState* scriptState) const
1322 { 1322 {
1323 if (!scriptState->world().isMainWorld()) 1323 if (!scriptState->world().isMainWorld())
1324 return nullptr; 1324 return nullptr;
1325 return customElements(); 1325 return customElements();
1326 } 1326 }
1327 1327
1328 CustomElementsRegistry* LocalDOMWindow::customElements() const 1328 CustomElementRegistry* LocalDOMWindow::customElements() const
1329 { 1329 {
1330 if (!m_customElements && m_document) 1330 if (!m_customElements && m_document)
1331 m_customElements = CustomElementsRegistry::create(this); 1331 m_customElements = CustomElementRegistry::create(this);
1332 return m_customElements; 1332 return m_customElements;
1333 } 1333 }
1334 1334
1335 CustomElementsRegistry* LocalDOMWindow::maybeCustomElements() const 1335 CustomElementRegistry* LocalDOMWindow::maybeCustomElements() const
1336 { 1336 {
1337 return m_customElements; 1337 return m_customElements;
1338 } 1338 }
1339 1339
1340 void LocalDOMWindow::addedEventListener(const AtomicString& eventType, Registere dEventListener& registeredListener) 1340 void LocalDOMWindow::addedEventListener(const AtomicString& eventType, Registere dEventListener& registeredListener)
1341 { 1341 {
1342 DOMWindow::addedEventListener(eventType, registeredListener); 1342 DOMWindow::addedEventListener(eventType, registeredListener);
1343 if (frame() && frame()->host()) 1343 if (frame() && frame()->host())
1344 frame()->host()->eventHandlerRegistry().didAddEventHandler(*this, eventT ype, registeredListener.options()); 1344 frame()->host()->eventHandlerRegistry().didAddEventHandler(*this, eventT ype, registeredListener.options());
1345 1345
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 { 1542 {
1543 // If the LocalDOMWindow still has a frame reference, that frame must point 1543 // If the LocalDOMWindow still has a frame reference, that frame must point
1544 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1544 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1545 // where script execution leaks between different LocalDOMWindows. 1545 // where script execution leaks between different LocalDOMWindows.
1546 if (m_frameObserver->frame()) 1546 if (m_frameObserver->frame())
1547 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this); 1547 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this);
1548 return m_frameObserver->frame(); 1548 return m_frameObserver->frame();
1549 } 1549 }
1550 1550
1551 } // namespace blink 1551 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/frame/RemoteDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698