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

Side by Side Diff: chrome/gpu/gpu_channel.cc

Issue 1546001: Split GpuProcessHost into GpuProcessHostUIShim, which runs on the UI... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/sandbox_policy.cc ('k') | chrome/gpu/gpu_thread.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 8
9 #include "chrome/gpu/gpu_channel.h" 9 #include "chrome/gpu/gpu_channel.h"
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void GpuChannel::OnChannelError() { 84 void GpuChannel::OnChannelError() {
85 // Destroy channel. This will cause the channel to be recreated if another 85 // Destroy channel. This will cause the channel to be recreated if another
86 // attempt is made to establish a connection from the corresponding renderer. 86 // attempt is made to establish a connection from the corresponding renderer.
87 channel_.reset(); 87 channel_.reset();
88 88
89 // Close renderer process handle. 89 // Close renderer process handle.
90 renderer_process_.Close(); 90 renderer_process_.Close();
91 91
92 #if defined(ENABLE_GPU) 92 #if defined(ENABLE_GPU)
93 // Destroy all the stubs on this channel. 93 // Destroy all the stubs on this channel.
94 for (size_t i = 0; i < stubs_.size(); ++i) { 94 for (StubMap::const_iterator iter = stubs_.begin();
95 router_.RemoveRoute(stubs_[i]->route_id()); 95 iter != stubs_.end();
96 ++iter) {
97 router_.RemoveRoute(iter->second->route_id());
96 } 98 }
97 stubs_.clear(); 99 stubs_.clear();
98 #endif 100 #endif
99 } 101 }
100 102
101 bool GpuChannel::Send(IPC::Message* message) { 103 bool GpuChannel::Send(IPC::Message* message) {
102 if (log_messages_) { 104 if (log_messages_) {
103 LOG(INFO) << "sending message @" << message << " on channel @" << this 105 LOG(INFO) << "sending message @" << message << " on channel @" << this
104 << " with type " << message->type(); 106 << " with type " << message->type();
105 } 107 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 channel_.reset(new IPC::SyncChannel( 217 channel_.reset(new IPC::SyncChannel(
216 channel_name, IPC::Channel::MODE_SERVER, this, NULL, 218 channel_name, IPC::Channel::MODE_SERVER, this, NULL,
217 ChildProcess::current()->io_message_loop(), false, 219 ChildProcess::current()->io_message_loop(), false,
218 ChildProcess::current()->GetShutDownEvent())); 220 ChildProcess::current()->GetShutDownEvent()));
219 return true; 221 return true;
220 } 222 }
221 223
222 std::string GpuChannel::GetChannelName() { 224 std::string GpuChannel::GetChannelName() {
223 return StringPrintf("%d.r%d", base::GetCurrentProcId(), renderer_id_); 225 return StringPrintf("%d.r%d", base::GetCurrentProcId(), renderer_id_);
224 } 226 }
OLDNEW
« no previous file with comments | « chrome/common/sandbox_policy.cc ('k') | chrome/gpu/gpu_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698