context.cc revision f2477e01787aa58f445919b809d89e252beef54f
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 3// found in the LICENSE file. 4 5#include "mojo/shell/context.h" 6 7#include "mojo/shell/network_delegate.h" 8#include "mojo/system/core_impl.h" 9 10namespace mojo { 11namespace shell { 12 13Context::Context() 14 : task_runners_(base::MessageLoop::current()->message_loop_proxy()), 15 storage_(), 16 loader_(task_runners_.io_runner(), 17 task_runners_.file_runner(), 18 task_runners_.cache_runner(), 19 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()), 20 storage_.profile_path()) { 21 system::CoreImpl::Init(); 22 BindingsSupport::Set(&bindings_support_impl_); 23} 24 25Context::~Context() { 26 BindingsSupport::Set(NULL); 27} 28 29} // namespace shell 30} // namespace mojo 31