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

Side by Side Diff: sky/engine/core/frame/LocalDOMWindow.cpp

Issue 871383002: Merge HTMLDocument into Document (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/fetch/CachingCorrectnessTest.cpp ('k') | sky/engine/core/html/HTMLDocument.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "sky/engine/core/events/PageTransitionEvent.h" 55 #include "sky/engine/core/events/PageTransitionEvent.h"
56 #include "sky/engine/core/frame/Console.h" 56 #include "sky/engine/core/frame/Console.h"
57 #include "sky/engine/core/frame/DOMWindowLifecycleNotifier.h" 57 #include "sky/engine/core/frame/DOMWindowLifecycleNotifier.h"
58 #include "sky/engine/core/frame/FrameConsole.h" 58 #include "sky/engine/core/frame/FrameConsole.h"
59 #include "sky/engine/core/frame/FrameHost.h" 59 #include "sky/engine/core/frame/FrameHost.h"
60 #include "sky/engine/core/frame/FrameView.h" 60 #include "sky/engine/core/frame/FrameView.h"
61 #include "sky/engine/core/frame/LocalFrame.h" 61 #include "sky/engine/core/frame/LocalFrame.h"
62 #include "sky/engine/core/frame/Location.h" 62 #include "sky/engine/core/frame/Location.h"
63 #include "sky/engine/core/frame/Screen.h" 63 #include "sky/engine/core/frame/Screen.h"
64 #include "sky/engine/core/frame/Settings.h" 64 #include "sky/engine/core/frame/Settings.h"
65 #include "sky/engine/core/html/HTMLDocument.h"
66 #include "sky/engine/core/inspector/ConsoleMessage.h" 65 #include "sky/engine/core/inspector/ConsoleMessage.h"
67 #include "sky/engine/core/inspector/ConsoleMessageStorage.h" 66 #include "sky/engine/core/inspector/ConsoleMessageStorage.h"
68 #include "sky/engine/core/inspector/InspectorTraceEvents.h" 67 #include "sky/engine/core/inspector/InspectorTraceEvents.h"
69 #include "sky/engine/core/loader/FrameLoaderClient.h" 68 #include "sky/engine/core/loader/FrameLoaderClient.h"
70 #include "sky/engine/core/page/Chrome.h" 69 #include "sky/engine/core/page/Chrome.h"
71 #include "sky/engine/core/page/ChromeClient.h" 70 #include "sky/engine/core/page/ChromeClient.h"
72 #include "sky/engine/core/page/EventHandler.h" 71 #include "sky/engine/core/page/EventHandler.h"
73 #include "sky/engine/core/page/Page.h" 72 #include "sky/engine/core/page/Page.h"
74 #include "sky/engine/core/rendering/style/RenderStyle.h" 73 #include "sky/engine/core/rendering/style/RenderStyle.h"
75 #include "sky/engine/platform/EventDispatchForbiddenScope.h" 74 #include "sky/engine/platform/EventDispatchForbiddenScope.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 { 220 {
222 dispatchEvent(Event::create(EventTypeNames::languagechange)); 221 dispatchEvent(Event::create(EventTypeNames::languagechange));
223 } 222 }
224 223
225 PassRefPtr<Document> LocalDOMWindow::installNewDocument(const DocumentInit& init ) 224 PassRefPtr<Document> LocalDOMWindow::installNewDocument(const DocumentInit& init )
226 { 225 {
227 ASSERT(init.frame() == m_frame); 226 ASSERT(init.frame() == m_frame);
228 227
229 clearDocument(); 228 clearDocument();
230 229
231 m_document = HTMLDocument::create(init); 230 m_document = Document::create(init);
232 m_application = Application::create(m_document.get(), m_document.get(), m_do cument->url().string()); 231 m_application = Application::create(m_document.get(), m_document.get(), m_do cument->url().string());
233 m_eventQueue = DOMWindowEventQueue::create(m_document.get()); 232 m_eventQueue = DOMWindowEventQueue::create(m_document.get());
234 m_document->attach(); 233 m_document->attach();
235 234
236 m_frame->script().updateDocument(); 235 m_frame->script().updateDocument();
237 return m_document; 236 return m_document;
238 } 237 }
239 238
240 EventQueue* LocalDOMWindow::eventQueue() const 239 EventQueue* LocalDOMWindow::eventQueue() const
241 { 240 {
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 { 742 {
744 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin dow>::lifecycleNotifier()); 743 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin dow>::lifecycleNotifier());
745 } 744 }
746 745
747 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo tifier() 746 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo tifier()
748 { 747 {
749 return DOMWindowLifecycleNotifier::create(this); 748 return DOMWindowLifecycleNotifier::create(this);
750 } 749 }
751 750
752 } // namespace blink 751 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/fetch/CachingCorrectnessTest.cpp ('k') | sky/engine/core/html/HTMLDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698