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

Side by Side Diff: mojo/public/system/core_private.cc

Issue 140403002: Mojo: Add the ability to hook up a channel to the embedder API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win 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
« no previous file with comments | « mojo/public/system/core_private.h ('k') | mojo/system/core_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/public/system/core_private.h" 5 #include "mojo/public/system/core_private.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 static mojo::Core* g_core = NULL; 10 static mojo::Core* g_core = NULL;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 return g_core->EndReadData(data_pipe_consumer_handle, num_elements_read); 121 return g_core->EndReadData(data_pipe_consumer_handle, num_elements_read);
122 } 122 }
123 123
124 } // extern "C" 124 } // extern "C"
125 125
126 namespace mojo { 126 namespace mojo {
127 127
128 Core::~Core() { 128 Core::~Core() {
129 } 129 }
130 130
131 // static
131 void Core::Init(Core* core) { 132 void Core::Init(Core* core) {
132 assert(!g_core); 133 assert(!g_core);
133 g_core = core; 134 g_core = core;
134 } 135 }
135 136
137 // static
138 Core* Core::Get() {
139 return g_core;
140 }
141
142 // static
143 void Core::Reset() {
144 g_core = NULL;
145 }
146
136 } // namespace mojo 147 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/system/core_private.h ('k') | mojo/system/core_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698