| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |