| 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/gles2/gles2_impl.h" | 7 #include "mojo/gles2/gles2_impl.h" |
| 8 #include "mojo/shell/network_delegate.h" | 8 #include "mojo/shell/network_delegate.h" |
| 9 #include "mojo/system/core_impl.h" | 9 #include "mojo/system/core_impl.h" |
| 10 | 10 |
| 11 namespace mojo { | 11 namespace mojo { |
| 12 namespace shell { | 12 namespace shell { |
| 13 | 13 |
| 14 Context::Context() | 14 Context::Context() |
| 15 : task_runners_(base::MessageLoop::current()->message_loop_proxy()), | 15 : task_runners_(base::MessageLoop::current()->message_loop_proxy()), |
| 16 storage_(), | 16 storage_(), |
| 17 loader_(task_runners_.io_runner(), | 17 loader_(task_runners_.io_runner(), |
| 18 task_runners_.file_runner(), | 18 task_runners_.file_runner(), |
| 19 task_runners_.cache_runner(), | 19 task_runners_.cache_runner(), |
| 20 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()), | 20 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()), |
| 21 storage_.profile_path()) { | 21 storage_.profile_path()) { |
| 22 system::CoreImpl::Init(); | 22 system::CoreImpl::Init(); |
| 23 gles2::GLES2Impl::Init(); | 23 gles2::GLES2Impl::Init(); |
| 24 BindingsSupport::Set(&bindings_support_impl_); | 24 BindingsSupport::Set(&bindings_support_impl_); |
| 25 service_manager_.reset(new ServiceManager(this)); |
| 25 } | 26 } |
| 26 | 27 |
| 27 Context::~Context() { | 28 Context::~Context() { |
| 28 BindingsSupport::Set(NULL); | 29 BindingsSupport::Set(NULL); |
| 29 } | 30 } |
| 30 | 31 |
| 31 } // namespace shell | 32 } // namespace shell |
| 32 } // namespace mojo | 33 } // namespace mojo |
| OLD | NEW |