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

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

Issue 1210253005: Factor dart_init.cc out of dart_controller.cc (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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/core.gni ('k') | sky/engine/core/frame/LocalFrame.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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 PassRefPtr<Document> LocalDOMWindow::installNewDocument(const DocumentInit& init ) 220 PassRefPtr<Document> LocalDOMWindow::installNewDocument(const DocumentInit& init )
221 { 221 {
222 ASSERT(init.frame() == m_frame); 222 ASSERT(init.frame() == m_frame);
223 223
224 clearDocument(); 224 clearDocument();
225 225
226 m_document = Document::create(init); 226 m_document = Document::create(init);
227 m_application = Application::create(m_document.get(), m_document.get(), m_do cument->url().string()); 227 m_application = Application::create(m_document.get(), m_document.get(), m_do cument->url().string());
228 m_eventQueue = DOMWindowEventQueue::create(m_document.get()); 228 m_eventQueue = DOMWindowEventQueue::create(m_document.get());
229 m_frame->dart().CreateIsolateFor(adoptPtr(
230 new DOMDartState(m_document.get(), m_document->url().string())));
231
232 {
233 Dart_Isolate isolate = m_frame->dart().dart_state()->isolate();
234 DartIsolateScope scope(isolate);
235 DartApiScope api_scope;
236 m_document->frame()->loaderClient()->didCreateIsolate(isolate);
237 }
238
239 m_document->attach(); 229 m_document->attach();
240 return m_document; 230 return m_document;
241 } 231 }
242 232
243 EventQueue* LocalDOMWindow::eventQueue() const 233 EventQueue* LocalDOMWindow::eventQueue() const
244 { 234 {
245 return m_eventQueue.get(); 235 return m_eventQueue.get();
246 } 236 }
247 237
248 void LocalDOMWindow::enqueueWindowEvent(PassRefPtr<Event> event) 238 void LocalDOMWindow::enqueueWindowEvent(PassRefPtr<Event> event)
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 { 725 {
736 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin dow>::lifecycleNotifier()); 726 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin dow>::lifecycleNotifier());
737 } 727 }
738 728
739 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo tifier() 729 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo tifier()
740 { 730 {
741 return DOMWindowLifecycleNotifier::create(this); 731 return DOMWindowLifecycleNotifier::create(this);
742 } 732 }
743 733
744 } // namespace blink 734 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698