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

Side by Side Diff: chrome/renderer/gpu_channel_host.cc

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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/renderer/gpu_channel_host.h ('k') | chrome/renderer/gpu_video_decoder_host.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 #include "chrome/renderer/gpu_channel_host.h" 5 #include "chrome/renderer/gpu_channel_host.h"
6 6
7 #include "chrome/common/child_process.h" 7 #include "chrome/common/child_process.h"
8 #include "chrome/common/gpu_create_command_buffer_config.h" 8 #include "chrome/common/gpu_create_command_buffer_config.h"
9 #include "chrome/common/gpu_messages.h" 9 #include "chrome/common/gpu_messages.h"
10 #include "chrome/renderer/command_buffer_proxy.h" 10 #include "chrome/renderer/command_buffer_proxy.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 void GpuChannelHost::set_gpu_info(const GPUInfo& gpu_info) { 32 void GpuChannelHost::set_gpu_info(const GPUInfo& gpu_info) {
33 gpu_info_ = gpu_info; 33 gpu_info_ = gpu_info;
34 } 34 }
35 35
36 const GPUInfo& GpuChannelHost::gpu_info() const { 36 const GPUInfo& GpuChannelHost::gpu_info() const {
37 return gpu_info_; 37 return gpu_info_;
38 } 38 }
39 39
40 void GpuChannelHost::OnMessageReceived(const IPC::Message& message) { 40 bool GpuChannelHost::OnMessageReceived(const IPC::Message& message) {
41 DCHECK(message.routing_id() != MSG_ROUTING_CONTROL); 41 DCHECK(message.routing_id() != MSG_ROUTING_CONTROL);
42 42
43 // The object to which the message is addressed might have been destroyed. 43 // The object to which the message is addressed might have been destroyed.
44 // This is expected, for example an asynchronous SwapBuffers notification 44 // This is expected, for example an asynchronous SwapBuffers notification
45 // to a command buffer proxy that has since been destroyed. This function 45 // to a command buffer proxy that has since been destroyed. This function
46 // fails silently in that case. 46 // fails silently in that case.
47 router_.RouteMessage(message); 47 return router_.RouteMessage(message);
48 } 48 }
49 49
50 void GpuChannelHost::OnChannelConnected(int32 peer_pid) { 50 void GpuChannelHost::OnChannelConnected(int32 peer_pid) {
51 // When the channel is connected we create a GpuVideoServiceHost and add it 51 // When the channel is connected we create a GpuVideoServiceHost and add it
52 // as a message filter. 52 // as a message filter.
53 gpu_video_service_host_ = new GpuVideoServiceHost(); 53 gpu_video_service_host_ = new GpuVideoServiceHost();
54 channel_->AddFilter(gpu_video_service_host_.get()); 54 channel_->AddFilter(gpu_video_service_host_.get());
55 } 55 }
56 56
57 void GpuChannelHost::OnChannelError() { 57 void GpuChannelHost::OnChannelError() {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // Check the proxy has not already been removed after a channel error. 157 // Check the proxy has not already been removed after a channel error.
158 int route_id = command_buffer->route_id(); 158 int route_id = command_buffer->route_id();
159 if (proxies_.find(command_buffer->route_id()) != proxies_.end()) { 159 if (proxies_.find(command_buffer->route_id()) != proxies_.end()) {
160 proxies_.erase(route_id); 160 proxies_.erase(route_id);
161 router_.RemoveRoute(route_id); 161 router_.RemoveRoute(route_id);
162 } 162 }
163 163
164 delete command_buffer; 164 delete command_buffer;
165 #endif 165 #endif
166 } 166 }
OLDNEW
« no previous file with comments | « chrome/renderer/gpu_channel_host.h ('k') | chrome/renderer/gpu_video_decoder_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698