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

Side by Side Diff: mojo/edk/system/core.h

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 5 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
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/core.cc » ('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 #ifndef MOJO_EDK_SYSTEM_CORE_H_ 5 #ifndef MOJO_EDK_SYSTEM_CORE_H_
6 #define MOJO_EDK_SYSTEM_CORE_H_ 6 #define MOJO_EDK_SYSTEM_CORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
14 #include "mojo/edk/system/handle_table.h" 15 #include "mojo/edk/system/handle_table.h"
15 #include "mojo/edk/system/mapping_table.h" 16 #include "mojo/edk/system/mapping_table.h"
16 #include "mojo/edk/system/memory.h" 17 #include "mojo/edk/system/memory.h"
17 #include "mojo/edk/system/system_impl_export.h" 18 #include "mojo/edk/system/system_impl_export.h"
18 #include "mojo/public/c/system/buffer.h" 19 #include "mojo/public/c/system/buffer.h"
19 #include "mojo/public/c/system/data_pipe.h" 20 #include "mojo/public/c/system/data_pipe.h"
(...skipping 22 matching lines...) Expand all
42 virtual ~Core(); 43 virtual ~Core();
43 44
44 // Adds |dispatcher| to the handle table, returning the handle for it. Returns 45 // Adds |dispatcher| to the handle table, returning the handle for it. Returns
45 // |MOJO_HANDLE_INVALID| on failure, namely if the handle table is full. 46 // |MOJO_HANDLE_INVALID| on failure, namely if the handle table is full.
46 MojoHandle AddDispatcher(const scoped_refptr<Dispatcher>& dispatcher); 47 MojoHandle AddDispatcher(const scoped_refptr<Dispatcher>& dispatcher);
47 48
48 // Looks up the dispatcher for the given handle. Returns null if the handle is 49 // Looks up the dispatcher for the given handle. Returns null if the handle is
49 // invalid. 50 // invalid.
50 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle); 51 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle);
51 52
53 // Watches on the given handle for the given signals, calling |callback| when
54 // a signal is satisfied or when all signals become unsatisfiable. |callback|
55 // must satisfy stringent requirements -- see |Awakable::Awake()| in
56 // awakable.h. In particular, it must not call any Mojo system functions.
57 MojoResult AsyncWait(MojoHandle handle,
58 MojoHandleSignals signals,
59 base::Callback<void(MojoResult)> callback);
60
52 embedder::PlatformSupport* platform_support() const { 61 embedder::PlatformSupport* platform_support() const {
53 return platform_support_.get(); 62 return platform_support_.get();
54 } 63 }
55 64
56 // --------------------------------------------------------------------------- 65 // ---------------------------------------------------------------------------
57 66
58 // System calls implementation: 67 // System calls implementation:
59 MojoTimeTicks GetTimeTicksNow(); 68 MojoTimeTicks GetTimeTicksNow();
60 MojoResult Close(MojoHandle handle); 69 MojoResult Close(MojoHandle handle);
61 MojoResult Wait(MojoHandle handle, 70 MojoResult Wait(MojoHandle handle,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 base::Lock mapping_table_lock_; // Protects |mapping_table_|. 156 base::Lock mapping_table_lock_; // Protects |mapping_table_|.
148 MappingTable mapping_table_; 157 MappingTable mapping_table_;
149 158
150 DISALLOW_COPY_AND_ASSIGN(Core); 159 DISALLOW_COPY_AND_ASSIGN(Core);
151 }; 160 };
152 161
153 } // namespace system 162 } // namespace system
154 } // namespace mojo 163 } // namespace mojo
155 164
156 #endif // MOJO_EDK_SYSTEM_CORE_H_ 165 #endif // MOJO_EDK_SYSTEM_CORE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698