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

Side by Side Diff: sky/engine/core/script/dom_dart_state.cc

Issue 1202283004: Factor DartLibraryProvider out of DartLoader (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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/script/dom_dart_state.h ('k') | sky/engine/tonic/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/engine/core/script/dom_dart_state.h" 5 #include "sky/engine/core/script/dom_dart_state.h"
6 6
7 #include "sky/engine/core/dom/Document.h" 7 #include "sky/engine/core/dom/Document.h"
8 #include "sky/engine/core/script/dart_loader.h"
9 #include "sky/engine/tonic/dart_builtin.h" 8 #include "sky/engine/tonic/dart_builtin.h"
10 9
11 namespace blink { 10 namespace blink {
12 11
13 DOMDartState::DOMDartState(Document* document, const KURL& url) 12 DOMDartState::DOMDartState(Document* document, const KURL& url)
14 : document_(document), url_(url), loader_(adoptPtr(new DartLoader(this))) { 13 : document_(document), url_(url) {
15 } 14 }
16 15
17 DOMDartState::~DOMDartState() { 16 DOMDartState::~DOMDartState() {
18 // We've already destroyed the isolate. Revoke any weak ptrs held by 17 // We've already destroyed the isolate. Revoke any weak ptrs held by
19 // DartPersistentValues so they don't try to enter the destroyed isolate to 18 // DartPersistentValues so they don't try to enter the destroyed isolate to
20 // clean themselves up. 19 // clean themselves up.
21 weak_factory_.InvalidateWeakPtrs(); 20 weak_factory_.InvalidateWeakPtrs();
22 } 21 }
23 22
24 void DOMDartState::DidSetIsolate() { 23 void DOMDartState::DidSetIsolate() {
(...skipping 18 matching lines...) Expand all
43 DCHECK(Current()->document_); 42 DCHECK(Current()->document_);
44 return Current()->document_->frame(); 43 return Current()->document_->frame();
45 } 44 }
46 45
47 LocalDOMWindow* DOMDartState::CurrentWindow() { 46 LocalDOMWindow* DOMDartState::CurrentWindow() {
48 DCHECK(Current()->document_); 47 DCHECK(Current()->document_);
49 return Current()->document_->domWindow(); 48 return Current()->document_->domWindow();
50 } 49 }
51 50
52 } // namespace blink 51 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/script/dom_dart_state.h ('k') | sky/engine/tonic/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698