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

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

Issue 1203143004: Make it possible to run Sky apps offline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: gn check 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/script/dart_controller.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(new DOMDartState(m_document.get(), m_document->url()))); 229 m_frame->dart().CreateIsolateFor(adoptPtr(
230 new DOMDartState(m_document.get(), m_document->url().string())));
230 231
231 { 232 {
232 Dart_Isolate isolate = m_frame->dart().dart_state()->isolate(); 233 Dart_Isolate isolate = m_frame->dart().dart_state()->isolate();
233 DartIsolateScope scope(isolate); 234 DartIsolateScope scope(isolate);
234 DartApiScope api_scope; 235 DartApiScope api_scope;
235 m_document->frame()->loaderClient()->didCreateIsolate(isolate); 236 m_document->frame()->loaderClient()->didCreateIsolate(isolate);
236 } 237 }
237 238
238 m_document->attach(); 239 m_document->attach();
239 return m_document; 240 return m_document;
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 { 735 {
735 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin dow>::lifecycleNotifier()); 736 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin dow>::lifecycleNotifier());
736 } 737 }
737 738
738 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo tifier() 739 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo tifier()
739 { 740 {
740 return DOMWindowLifecycleNotifier::create(this); 741 return DOMWindowLifecycleNotifier::create(this);
741 } 742 }
742 743
743 } // namespace blink 744 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/script/dart_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698