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

Side by Side Diff: sky/engine/web/Sky.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/public/sky/sky_view.cc ('k') | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 32
33 #include "base/message_loop/message_loop.h" 33 #include "base/message_loop/message_loop.h"
34 #include "base/rand_util.h" 34 #include "base/rand_util.h"
35 #include "gen/sky/platform/RuntimeEnabledFeatures.h" 35 #include "gen/sky/platform/RuntimeEnabledFeatures.h"
36 #include "mojo/common/message_pump_mojo.h" 36 #include "mojo/common/message_pump_mojo.h"
37 #include "sky/engine/core/animation/AnimationClock.h" 37 #include "sky/engine/core/animation/AnimationClock.h"
38 #include "sky/engine/core/dom/Microtask.h" 38 #include "sky/engine/core/dom/Microtask.h"
39 #include "sky/engine/core/frame/Settings.h" 39 #include "sky/engine/core/frame/Settings.h"
40 #include "sky/engine/core/Init.h" 40 #include "sky/engine/core/Init.h"
41 #include "sky/engine/core/page/Page.h" 41 #include "sky/engine/core/page/Page.h"
42 #include "sky/engine/core/script/dart_controller.h" 42 #include "sky/engine/core/script/dart_init.h"
43 #include "sky/engine/platform/LayoutTestSupport.h" 43 #include "sky/engine/platform/LayoutTestSupport.h"
44 #include "sky/engine/platform/Logging.h" 44 #include "sky/engine/platform/Logging.h"
45 #include "sky/engine/public/platform/Platform.h" 45 #include "sky/engine/public/platform/Platform.h"
46 #include "sky/engine/wtf/Assertions.h" 46 #include "sky/engine/wtf/Assertions.h"
47 #include "sky/engine/wtf/CryptographicallyRandomNumber.h" 47 #include "sky/engine/wtf/CryptographicallyRandomNumber.h"
48 #include "sky/engine/wtf/MainThread.h" 48 #include "sky/engine/wtf/MainThread.h"
49 #include "sky/engine/wtf/text/AtomicString.h" 49 #include "sky/engine/wtf/text/AtomicString.h"
50 #include "sky/engine/wtf/text/TextEncoding.h" 50 #include "sky/engine/wtf/text/TextEncoding.h"
51 #include "sky/engine/wtf/WTF.h" 51 #include "sky/engine/wtf/WTF.h"
52 52
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 // There are some code paths (for example, running WebKit in the browser 135 // There are some code paths (for example, running WebKit in the browser
136 // process and calling into LocalStorage before anything else) where the 136 // process and calling into LocalStorage before anything else) where the
137 // UTF8 string encoding tables are used on a background thread before 137 // UTF8 string encoding tables are used on a background thread before
138 // they're set up. This is a problem because their set up routines assert 138 // they're set up. This is a problem because their set up routines assert
139 // they're running on the main WebKitThread. It might be possible to make 139 // they're running on the main WebKitThread. It might be possible to make
140 // the initialization thread-safe, but given that so many code paths use 140 // the initialization thread-safe, but given that so many code paths use
141 // this, initializing this lazily probably doesn't buy us much. 141 // this, initializing this lazily probably doesn't buy us much.
142 WTF::UTF8Encoding(); 142 WTF::UTF8Encoding();
143 143
144 DartController::InitVM(); 144 InitDartVM();
145 145
146 addMessageLoopObservers(); 146 addMessageLoopObservers();
147 } 147 }
148 148
149 void shutdown() 149 void shutdown()
150 { 150 {
151 removeMessageLoopObservers(); 151 removeMessageLoopObservers();
152 152
153 // FIXME: Shutdown dart? 153 // FIXME: Shutdown dart?
154 154
(...skipping 25 matching lines...) Expand all
180 void enableLogChannel(const char* name) 180 void enableLogChannel(const char* name)
181 { 181 {
182 #if !LOG_DISABLED 182 #if !LOG_DISABLED
183 WTFLogChannel* channel = getChannelFromName(name); 183 WTFLogChannel* channel = getChannelFromName(name);
184 if (channel) 184 if (channel)
185 channel->state = WTFLogChannelOn; 185 channel->state = WTFLogChannelOn;
186 #endif // !LOG_DISABLED 186 #endif // !LOG_DISABLED
187 } 187 }
188 188
189 } // namespace blink 189 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/public/sky/sky_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698