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

Side by Side Diff: services/dart/content_handler_app.cc

Issue 2014043002: Make TracingImpl take a Shell* and args, instead of an ApplicationImpl*. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 | « mojo/common/tracing_impl.cc ('k') | services/dart/dart_tracing.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "services/dart/content_handler_app.h" 4 #include "services/dart/content_handler_app.h"
5 5
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 callback.Run(); 125 callback.Run();
126 }); 126 });
127 } 127 }
128 128
129 bool DartContentHandlerApp::run_on_message_loop() const { 129 bool DartContentHandlerApp::run_on_message_loop() const {
130 return run_on_message_loop_; 130 return run_on_message_loop_;
131 } 131 }
132 132
133 void DartContentHandlerApp::Initialize(mojo::ApplicationImpl* app) { 133 void DartContentHandlerApp::Initialize(mojo::ApplicationImpl* app) {
134 // Tracing of content handler and controller. 134 // Tracing of content handler and controller.
135 tracing_.Initialize(app); 135 tracing_.Initialize(app->shell(), &app->args());
136 // Tracing of isolates and VM. 136 // Tracing of isolates and VM.
137 dart_tracing_.Initialize(app); 137 dart_tracing_.Initialize(app->shell());
138 138
139 // TODO(qsr): This has no effect for now, as the tracing infrastructure 139 // TODO(qsr): This has no effect for now, as the tracing infrastructure
140 // doesn't allow to trace anything before the tracing app connects to the 140 // doesn't allow to trace anything before the tracing app connects to the
141 // application. 141 // application.
142 TRACE_EVENT0("dart_content_handler", "DartContentHandler::Initialize"); 142 TRACE_EVENT0("dart_content_handler", "DartContentHandler::Initialize");
143 143
144 default_strict_ = app->HasArg(kEnableStrictMode); 144 default_strict_ = app->HasArg(kEnableStrictMode);
145 content_handler_.set_handler_task_runner( 145 content_handler_.set_handler_task_runner(
146 base::MessageLoop::current()->task_runner()); 146 base::MessageLoop::current()->task_runner());
147 strict_content_handler_.set_handler_task_runner( 147 strict_content_handler_.set_handler_task_runner(
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } else { 251 } else {
252 // Loading a raw .dart file pointed at by |url|. 252 // Loading a raw .dart file pointed at by |url|.
253 return make_scoped_ptr( 253 return make_scoped_ptr(
254 new DartApp(application_request.Pass(), url, strict_, 254 new DartApp(application_request.Pass(), url, strict_,
255 run_on_message_loop, override_pause_isolates_flags, 255 run_on_message_loop, override_pause_isolates_flags,
256 pause_isolates_on_start, pause_isolates_on_exit)); 256 pause_isolates_on_start, pause_isolates_on_exit));
257 } 257 }
258 } 258 }
259 259
260 } // namespace dart 260 } // namespace dart
OLDNEW
« no previous file with comments | « mojo/common/tracing_impl.cc ('k') | services/dart/dart_tracing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698