| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/shell/context.h" | 5 #include "mojo/shell/context.h" |
| 6 | 6 |
| 7 #include "mojo/shell/network_delegate.h" | 7 #include "mojo/shell/network_delegate.h" |
| 8 #include "mojo/system/core_impl.h" | 8 #include "mojo/system/core_impl.h" |
| 9 | 9 |
| 10 namespace mojo { | 10 namespace mojo { |
| 11 namespace shell { | 11 namespace shell { |
| 12 | 12 |
| 13 Context::Context() | 13 Context::Context() |
| 14 : task_runners_(base::MessageLoop::current()->message_loop_proxy()), | 14 : task_runners_(base::MessageLoop::current()->message_loop_proxy()), |
| 15 storage_(), | 15 storage_(), |
| 16 loader_(task_runners_.io_runner(), | 16 loader_(task_runners_.io_runner(), |
| 17 task_runners_.file_runner(), | 17 task_runners_.file_runner(), |
| 18 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()), | 18 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()), |
| 19 storage_.profile_path()) { | 19 storage_.profile_path()) { |
| 20 system::CoreImpl::Init(); | 20 system::CoreImpl::Init(); |
| 21 BindingsSupport::Set(&bindings_support_impl_); |
| 21 } | 22 } |
| 22 | 23 |
| 23 Context::~Context() { | 24 Context::~Context() { |
| 25 BindingsSupport::Set(NULL); |
| 24 } | 26 } |
| 25 | 27 |
| 26 } // namespace shell | 28 } // namespace shell |
| 27 } // namespace mojo | 29 } // namespace mojo |
| OLD | NEW |