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

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: Fix Widows build & Organize headers Created 4 years, 7 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 <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();
bbudge 2016/05/17 09:50:12 This doesn't seem to be used yet. It seems undesir
adrian.belgun 2016/05/17 11:05:29 This class is used by both the Resource and the Re
bbudge 2016/05/17 13:34:39 But the host has access to that handle already (to
adrian.belgun 2016/05/17 15:25:29 The issue is that this API is tied to the chrome.v
26
27 private:
28 uint32_t capacity_;
29 uint32_t packet_size_;
30 std::unique_ptr<base::SharedMemory> shm_;
31 std::unique_ptr<bool[]> available_;
bbudge 2016/05/17 09:50:12 std::vector<bool> is a little tricky to use but sh
adrian.belgun 2016/05/17 11:05:29 Done.
32 };
33
34 } // namespace ppapi
35
36 #endif // PPAPI_SHAERD_IMPL_VPN_PROVIDER_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698