1f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch// Copyright 2013 The Chromium Authors. All rights reserved. 2f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch// Use of this source code is governed by a BSD-style license that can be 3f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch// found in the LICENSE file. 4f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch 5f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch#include "mojo/shell/context.h" 6f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch 7f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch#include "mojo/gles2/gles2_impl.h" 8f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch#include "mojo/shell/network_delegate.h" 9f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch#include "mojo/system/core_impl.h" 10f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch 11f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdochnamespace mojo { 12f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdochnamespace shell { 13f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch 14f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen MurdochContext::Context() 15f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch : task_runners_(base::MessageLoop::current()->message_loop_proxy()), 16f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch storage_(), 17f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch loader_(task_runners_.io_runner(), 18f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch task_runners_.file_runner(), 19f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch task_runners_.cache_runner(), 20f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()), 21f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch storage_.profile_path()) { 22f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch system::CoreImpl::Init(); 23f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch gles2::GLES2Impl::Init(); 24f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch BindingsSupport::Set(&bindings_support_impl_); 25f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch} 26f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch 27f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen MurdochContext::~Context() { 28f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch BindingsSupport::Set(NULL); 29f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch} 30f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch 31f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch} // namespace shell 32f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch} // namespace mojo 33f74420b3285b9fe04a7e00aa3b8c0ab07ea344bcBen Murdoch