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

Side by Side Diff: remoting/base/shared_buffer.cc

Issue 11470028: Move screen capturers to remoting/capturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « remoting/base/shared_buffer.h ('k') | remoting/base/shared_buffer_factory.h » ('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 (c) 2012 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 #include "remoting/base/shared_buffer.h"
6
7 const bool kReadOnly = true;
8
9 namespace remoting {
10
11 SharedBuffer::SharedBuffer(uint32 size)
12 : id_(0),
13 size_(size) {
14 shared_memory_.CreateAndMapAnonymous(size);
15 }
16
17 SharedBuffer::SharedBuffer(
18 int id, base::SharedMemoryHandle handle, uint32 size)
19 : id_(id),
20 shared_memory_(handle, kReadOnly),
21 size_(size) {
22 shared_memory_.Map(size);
23 }
24
25 SharedBuffer::SharedBuffer(
26 int id, base::SharedMemoryHandle handle, base::ProcessHandle process,
27 uint32 size)
28 : id_(id),
29 shared_memory_(handle, kReadOnly, process),
30 size_(size) {
31 shared_memory_.Map(size);
32 }
33
34 SharedBuffer::~SharedBuffer() {
35 }
36
37 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/shared_buffer.h ('k') | remoting/base/shared_buffer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698