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

Side by Side Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 1184523003: attachment broker wip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comments. Created 5 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 | « content/common/gpu/client/gpu_channel_host.h ('k') | content/common/gpu/gpu_channel.h » ('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 "content/common/gpu/client/gpu_channel_host.h" 5 #include "content/common/gpu/client/gpu_channel_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 next_route_id_.GetNext(); 66 next_route_id_.GetNext();
67 } 67 }
68 68
69 void GpuChannelHost::Connect(const IPC::ChannelHandle& channel_handle, 69 void GpuChannelHost::Connect(const IPC::ChannelHandle& channel_handle,
70 base::WaitableEvent* shutdown_event) { 70 base::WaitableEvent* shutdown_event) {
71 DCHECK(factory_->IsMainThread()); 71 DCHECK(factory_->IsMainThread());
72 // Open a channel to the GPU process. We pass NULL as the main listener here 72 // Open a channel to the GPU process. We pass NULL as the main listener here
73 // since we need to filter everything to route it to the right thread. 73 // since we need to filter everything to route it to the right thread.
74 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = 74 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
75 factory_->GetIOThreadTaskRunner(); 75 factory_->GetIOThreadTaskRunner();
76 channel_ = 76 // TODO(erikchen): fixme
77 IPC::SyncChannel::Create(channel_handle, IPC::Channel::MODE_CLIENT, NULL, 77 channel_ = IPC::SyncChannel::Create(
78 io_task_runner.get(), true, shutdown_event); 78 channel_handle, IPC::Channel::MODE_CLIENT, NULL, io_task_runner.get(),
79 true, shutdown_event, factory_->GetAttachmentBroker());
79 80
80 sync_filter_ = new IPC::SyncMessageFilter(shutdown_event); 81 sync_filter_ = new IPC::SyncMessageFilter(shutdown_event);
81 82
82 channel_->AddFilter(sync_filter_.get()); 83 channel_->AddFilter(sync_filter_.get());
83 84
84 channel_filter_ = new MessageFilter(); 85 channel_filter_ = new MessageFilter();
85 86
86 // Install the filter last, because we intercept all leftover 87 // Install the filter last, because we intercept all leftover
87 // messages. 88 // messages.
88 channel_->AddFilter(channel_filter_.get()); 89 channel_->AddFilter(channel_filter_.get());
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 437
437 listeners_.clear(); 438 listeners_.clear();
438 } 439 }
439 440
440 bool GpuChannelHost::MessageFilter::IsLost() const { 441 bool GpuChannelHost::MessageFilter::IsLost() const {
441 AutoLock lock(lock_); 442 AutoLock lock(lock_);
442 return lost_; 443 return lost_;
443 } 444 }
444 445
445 } // namespace content 446 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.h ('k') | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698