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

Side by Side Diff: mojo/public/utility/environment.cc

Issue 134253004: Mojo: AsyncWaiter and mojo/public/environment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
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/public/utility/environment.h"
6
7 #include "mojo/public/utility/bindings_support_impl.h"
8 #include "mojo/public/utility/run_loop.h"
9
10 namespace mojo {
11
12 Environment::Environment() : bindings_support_(NULL) {
13 RunLoop::SetUp();
14
15 internal::BindingsSupportImpl::SetUp();
16 bindings_support_ = new internal::BindingsSupportImpl;
17 BindingsSupport::Set(bindings_support_);
18 }
19
20 Environment::~Environment() {
21 // Allow for someone to have replaced BindingsSupport.
22 if (BindingsSupport::Get() == bindings_support_)
23 BindingsSupport::Set(NULL);
24 delete bindings_support_;
25 internal::BindingsSupportImpl::TearDown();
26
27 RunLoop::TearDown();
28 }
29
30 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698