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

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

Issue 1478503003: EDK: Convert most uses of PlatformHandleVector to std::vector<ScopedPlatformHandle>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PLATFORM_HANDLE_DISPATCHER_H_ 5 #ifndef MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
6 #define MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_ 6 #define MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
7 7
8 #include "mojo/edk/embedder/scoped_platform_handle.h" 8 #include "mojo/edk/embedder/scoped_platform_handle.h"
9 #include "mojo/edk/system/simple_dispatcher.h" 9 #include "mojo/edk/system/simple_dispatcher.h"
10 #include "mojo/edk/util/ref_ptr.h" 10 #include "mojo/edk/util/ref_ptr.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // |Dispatcher| public methods: 28 // |Dispatcher| public methods:
29 Type GetType() const override; 29 Type GetType() const override;
30 30
31 // The "opposite" of |SerializeAndClose()|. (Typically this is called by 31 // The "opposite" of |SerializeAndClose()|. (Typically this is called by
32 // |Dispatcher::Deserialize()|.) 32 // |Dispatcher::Deserialize()|.)
33 static util::RefPtr<PlatformHandleDispatcher> Deserialize( 33 static util::RefPtr<PlatformHandleDispatcher> Deserialize(
34 Channel* channel, 34 Channel* channel,
35 const void* source, 35 const void* source,
36 size_t size, 36 size_t size,
37 embedder::PlatformHandleVector* platform_handles); 37 std::vector<embedder::ScopedPlatformHandle>* platform_handles);
38 38
39 private: 39 private:
40 explicit PlatformHandleDispatcher( 40 explicit PlatformHandleDispatcher(
41 embedder::ScopedPlatformHandle platform_handle); 41 embedder::ScopedPlatformHandle platform_handle);
42 ~PlatformHandleDispatcher() override; 42 ~PlatformHandleDispatcher() override;
43 43
44 // |Dispatcher| protected methods: 44 // |Dispatcher| protected methods:
45 void CloseImplNoLock() override; 45 void CloseImplNoLock() override;
46 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() 46 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
47 override; 47 override;
48 void StartSerializeImplNoLock(Channel* channel, 48 void StartSerializeImplNoLock(Channel* channel,
49 size_t* max_size, 49 size_t* max_size,
50 size_t* max_platform_handles) override 50 size_t* max_platform_handles) override
51 MOJO_NOT_THREAD_SAFE; 51 MOJO_NOT_THREAD_SAFE;
52 bool EndSerializeAndCloseImplNoLock( 52 bool EndSerializeAndCloseImplNoLock(
53 Channel* channel, 53 Channel* channel,
54 void* destination, 54 void* destination,
55 size_t* actual_size, 55 size_t* actual_size,
56 embedder::PlatformHandleVector* platform_handles) override 56 std::vector<embedder::ScopedPlatformHandle>* platform_handles) override
57 MOJO_NOT_THREAD_SAFE; 57 MOJO_NOT_THREAD_SAFE;
58 58
59 embedder::ScopedPlatformHandle platform_handle_ MOJO_GUARDED_BY(mutex()); 59 embedder::ScopedPlatformHandle platform_handle_ MOJO_GUARDED_BY(mutex());
60 60
61 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformHandleDispatcher); 61 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformHandleDispatcher);
62 }; 62 };
63 63
64 } // namespace system 64 } // namespace system
65 } // namespace mojo 65 } // namespace mojo
66 66
67 #endif // MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_ 67 #endif // MOJO_EDK_SYSTEM_PLATFORM_HANDLE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe_dispatcher.cc ('k') | mojo/edk/system/platform_handle_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698