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

Side by Side Diff: remoting/host/desktop_session_agent.cc

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_global
Patch Set: Rebase. Created 5 years, 2 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/proxy/ppb_image_data_proxy.cc ('k') | remoting/host/desktop_session_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #include "remoting/host/desktop_session_agent.h" 5 #include "remoting/host/desktop_session_agent.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "ipc/ipc_channel_proxy.h" 10 #include "ipc/ipc_channel_proxy.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 ~SharedBuffer() override { agent_->OnSharedBufferDeleted(id()); } 81 ~SharedBuffer() override { agent_->OnSharedBufferDeleted(id()); }
82 82
83 private: 83 private:
84 SharedBuffer(DesktopSessionAgent* agent, 84 SharedBuffer(DesktopSessionAgent* agent,
85 scoped_ptr<base::SharedMemory> memory, 85 scoped_ptr<base::SharedMemory> memory,
86 size_t size, 86 size_t size,
87 int id) 87 int id)
88 : SharedMemory(memory->memory(), 88 : SharedMemory(memory->memory(),
89 size, 89 size,
90 #if defined(OS_WIN) 90 #if defined(OS_WIN)
91 memory->handle(), 91 memory->handle().GetHandle(),
92 #else 92 #else
93 base::SharedMemory::GetFdFromSharedMemoryHandle( 93 base::SharedMemory::GetFdFromSharedMemoryHandle(
94 memory->handle()), 94 memory->handle()),
95 #endif 95 #endif
96 id), 96 id),
97 agent_(agent), 97 agent_(agent),
98 shared_memory_(memory.Pass()) { 98 shared_memory_(memory.Pass()) {
99 } 99 }
100 100
101 DesktopSessionAgent* agent_; 101 DesktopSessionAgent* agent_;
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 void DesktopSessionAgent::OnSharedBufferDeleted(int id) { 596 void DesktopSessionAgent::OnSharedBufferDeleted(int id) {
597 DCHECK(video_capture_task_runner_->BelongsToCurrentThread()); 597 DCHECK(video_capture_task_runner_->BelongsToCurrentThread());
598 DCHECK(id != 0); 598 DCHECK(id != 0);
599 599
600 shared_buffers_--; 600 shared_buffers_--;
601 DCHECK_GE(shared_buffers_, 0); 601 DCHECK_GE(shared_buffers_, 0);
602 SendToNetwork(new ChromotingDesktopNetworkMsg_ReleaseSharedBuffer(id)); 602 SendToNetwork(new ChromotingDesktopNetworkMsg_ReleaseSharedBuffer(id));
603 } 603 }
604 604
605 } // namespace remoting 605 } // namespace remoting
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.cc ('k') | remoting/host/desktop_session_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698