| OLD | NEW | 
|    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2011 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 "content/gpu/gpu_channel.h" |    9 #include "content/gpu/gpu_channel.h" | 
|   10  |   10  | 
|   11 #include "base/command_line.h" |   11 #include "base/command_line.h" | 
|   12 #include "base/process_util.h" |   12 #include "base/process_util.h" | 
|   13 #include "base/string_util.h" |   13 #include "base/string_util.h" | 
|   14 #include "content/common/child_process.h" |   14 #include "content/common/child_process.h" | 
|   15 #include "content/common/content_client.h" |   15 #include "content/common/content_client.h" | 
|   16 #include "content/common/content_switches.h" |   16 #include "content/common/content_switches.h" | 
|   17 #include "content/common/gpu_messages.h" |   17 #include "content/common/gpu_messages.h" | 
|   18 #include "content/gpu/gpu_render_thread.h" |   18 #include "content/gpu/gpu_render_thread.h" | 
|   19 #include "content/gpu/gpu_video_service.h" |   19 #include "content/gpu/gpu_video_service.h" | 
|   20  |   20  | 
|   21 #if defined(OS_POSIX) |   21 #if defined(OS_POSIX) | 
|   22 #include "ipc/ipc_channel_posix.h" |   22 #include "ipc/ipc_channel_posix.h" | 
|   23 #endif |   23 #endif | 
|   24  |   24  | 
|   25 GpuChannel::GpuChannel(GpuRenderThread* gpu_render_thread, |   25 GpuChannel::GpuChannel(GpuRenderThread* gpu_render_thread, | 
|   26                        GpuWatchdogThread* gpu_watchdog_thread, |   26                        GpuWatchdogThread* gpu_watchdog_thread, | 
|   27                        int renderer_id) |   27                        int renderer_id) | 
|   28     : gpu_render_thread_(gpu_render_thread), |   28     : gpu_render_thread_(gpu_render_thread), | 
|   29       renderer_id_(renderer_id), |   29       renderer_id_(renderer_id), | 
|   30       renderer_process_(NULL), |   30       renderer_process_(base::kNullProcessHandle), | 
|   31       renderer_pid_(NULL), |   31       renderer_pid_(base::kNullProcessId), | 
|   32       watchdog_thread_(gpu_watchdog_thread) { |   32       watchdog_thread_(gpu_watchdog_thread) { | 
|   33   DCHECK(gpu_render_thread); |   33   DCHECK(gpu_render_thread); | 
|   34   DCHECK(renderer_id); |   34   DCHECK(renderer_id); | 
|   35   const CommandLine* command_line = CommandLine::ForCurrentProcess(); |   35   const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 
|   36   log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); |   36   log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); | 
|   37   disallowed_extensions_.multisampling = |   37   disallowed_extensions_.multisampling = | 
|   38       command_line->HasSwitch(switches::kDisableGLMultisampling); |   38       command_line->HasSwitch(switches::kDisableGLMultisampling); | 
|   39 } |   39 } | 
|   40  |   40  | 
|   41 GpuChannel::~GpuChannel() { |   41 GpuChannel::~GpuChannel() { | 
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  264  |  264  | 
|  265 #if defined(OS_POSIX) |  265 #if defined(OS_POSIX) | 
|  266 int GpuChannel::GetRendererFileDescriptor() { |  266 int GpuChannel::GetRendererFileDescriptor() { | 
|  267   int fd = -1; |  267   int fd = -1; | 
|  268   if (channel_.get()) { |  268   if (channel_.get()) { | 
|  269     fd = channel_->GetClientFileDescriptor(); |  269     fd = channel_->GetClientFileDescriptor(); | 
|  270   } |  270   } | 
|  271   return fd; |  271   return fd; | 
|  272 } |  272 } | 
|  273 #endif  // defined(OS_POSIX) |  273 #endif  // defined(OS_POSIX) | 
|  274  |  | 
| OLD | NEW |