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

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

Issue 1726303003: ppapi: PPB_VpnProvider: Define API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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
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 "base/memory/shared_memory.h"
9
10 namespace ppapi {
11
12 class VpnProviderSharedBuffer {
13 public:
14 VpnProviderSharedBuffer(uint32_t capacity,
15 uint32_t packet_size,
16 std::unique_ptr<base::SharedMemory> shm);
17 ~VpnProviderSharedBuffer();
18
19 bool GetAvailable(uint32_t* id);
20 void SetAvailable(uint32_t id, bool value);
21 void* GetBuffer(uint32_t id);
22 base::SharedMemoryHandle GetHandle();
23
24 private:
25 uint32_t capacity_;
26 uint32_t packet_size_;
27 std::unique_ptr<base::SharedMemory> shm_;
28 std::unique_ptr<bool[]> available_;
29 };
30
31 } // namespace ppapi
32
33 #endif // PPAPI_SHAERD_IMPL_VPN_PROVIDER_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698