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

Side by Side Diff: ppapi/shared_impl/vpn_provider_util.h

Issue 1931513002: ppapi: PPB_VpnProvider: Implement Resource Stub (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vpn-api-messages
Patch Set: Simplify OnReplyReceived. Fix Windows build. Created 4 years, 6 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 | « ppapi/shared_impl/BUILD.gn ('k') | ppapi/shared_impl/vpn_provider_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 #ifndef PPAPI_SHAERD_IMPL_VPN_PROVIDER_UTIL_H_
6 #define PPAPI_SHAERD_IMPL_VPN_PROVIDER_UTIL_H_
7
8 #include <memory>
9
10 #include "base/memory/shared_memory.h"
11 #include "ppapi/shared_impl/ppapi_shared_export.h"
12
13 namespace ppapi {
14
15 class PPAPI_SHARED_EXPORT VpnProviderSharedBuffer {
16 public:
17 VpnProviderSharedBuffer(uint32_t capacity,
18 uint32_t packet_size,
19 std::unique_ptr<base::SharedMemory> shm);
20 ~VpnProviderSharedBuffer();
21
22 bool GetAvailable(uint32_t* id);
23 void SetAvailable(uint32_t id, bool value);
24 void* GetBuffer(uint32_t id);
25 base::SharedMemoryHandle GetHandle();
26
27 private:
28 uint32_t capacity_;
29 uint32_t packet_size_;
30 std::unique_ptr<base::SharedMemory> shm_;
31 std::vector<bool> available_;
32 };
33
34 } // namespace ppapi
35
36 #endif // PPAPI_SHAERD_IMPL_VPN_PROVIDER_UTIL_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/BUILD.gn ('k') | ppapi/shared_impl/vpn_provider_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698