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

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

Issue 15745014: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 7 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 | « content/common/gpu/client/gpu_channel_host.h ('k') | content/common/gpu/gpu_info_unittest.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 "content/common/gpu/client/gpu_channel_host.h" 5 #include "content/common/gpu/client/gpu_channel_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Install the filter last, because we intercept all leftover 59 // Install the filter last, because we intercept all leftover
60 // messages. 60 // messages.
61 channel_->AddFilter(channel_filter_.get()); 61 channel_->AddFilter(channel_filter_.get());
62 62
63 // It is safe to send IPC messages before the channel completes the connection 63 // It is safe to send IPC messages before the channel completes the connection
64 // and receives the hello message from the GPU process. The messages get 64 // and receives the hello message from the GPU process. The messages get
65 // cached. 65 // cached.
66 state_ = kConnected; 66 state_ = kConnected;
67 } 67 }
68 68
69 void GpuChannelHost::set_gpu_info(const GPUInfo& gpu_info) { 69 void GpuChannelHost::set_gpu_info(const gpu::GPUInfo& gpu_info) {
70 gpu_info_ = gpu_info; 70 gpu_info_ = gpu_info;
71 } 71 }
72 72
73 void GpuChannelHost::SetStateLost() { 73 void GpuChannelHost::SetStateLost() {
74 state_ = kLost; 74 state_ = kLost;
75 } 75 }
76 76
77 const GPUInfo& GpuChannelHost::gpu_info() const { 77 const gpu::GPUInfo& GpuChannelHost::gpu_info() const {
78 return gpu_info_; 78 return gpu_info_;
79 } 79 }
80 80
81 void GpuChannelHost::OnMessageReceived(const IPC::Message& message) { 81 void GpuChannelHost::OnMessageReceived(const IPC::Message& message) {
82 bool handled = true; 82 bool handled = true;
83 83
84 IPC_BEGIN_MESSAGE_MAP(GpuChannelHost, message) 84 IPC_BEGIN_MESSAGE_MAP(GpuChannelHost, message)
85 IPC_MESSAGE_HANDLER(GpuChannelMsg_GenerateMailboxNamesReply, 85 IPC_MESSAGE_HANDLER(GpuChannelMsg_GenerateMailboxNamesReply,
86 OnGenerateMailboxNamesReply) 86 OnGenerateMailboxNamesReply)
87 IPC_MESSAGE_UNHANDLED(handled = false) 87 IPC_MESSAGE_UNHANDLED(handled = false)
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 const GpuListenerInfo& info = it->second; 390 const GpuListenerInfo& info = it->second;
391 info.loop->PostTask( 391 info.loop->PostTask(
392 FROM_HERE, 392 FROM_HERE,
393 base::Bind(&IPC::Listener::OnChannelError, info.listener)); 393 base::Bind(&IPC::Listener::OnChannelError, info.listener));
394 } 394 }
395 395
396 listeners_.clear(); 396 listeners_.clear();
397 } 397 }
398 398
399 } // namespace content 399 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.h ('k') | content/common/gpu/gpu_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698