OLD | NEW |
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/browser/gpu_process_host.h" | 5 #include "chrome/browser/gpu_process_host.h" |
6 | 6 |
7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 filter->Send(message); | 470 filter->Send(message); |
471 } | 471 } |
472 | 472 |
473 // Sends the response for synchronization request to the renderer. | 473 // Sends the response for synchronization request to the renderer. |
474 void GpuProcessHost::SendSynchronizationReply( | 474 void GpuProcessHost::SendSynchronizationReply( |
475 IPC::Message* reply, | 475 IPC::Message* reply, |
476 RenderMessageFilter* filter) { | 476 RenderMessageFilter* filter) { |
477 filter->Send(reply); | 477 filter->Send(reply); |
478 } | 478 } |
479 | 479 |
480 URLRequestContext* GpuProcessHost::GetRequestContext( | |
481 uint32 request_id, | |
482 const ViewHostMsg_Resource_Request& request_data) { | |
483 return NULL; | |
484 } | |
485 | |
486 bool GpuProcessHost::CanShutdown() { | 480 bool GpuProcessHost::CanShutdown() { |
487 return true; | 481 return true; |
488 } | 482 } |
489 | 483 |
490 void GpuProcessHost::OnChildDied() { | 484 void GpuProcessHost::OnChildDied() { |
491 // Located in OnChildDied because OnProcessCrashed suffers from a race | 485 // Located in OnChildDied because OnProcessCrashed suffers from a race |
492 // condition on Linux. The GPU process will only die if it crashes. | 486 // condition on Linux. The GPU process will only die if it crashes. |
493 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", | 487 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", |
494 kCrashed, kGPUProcessLifetimeEvent_Max); | 488 kCrashed, kGPUProcessLifetimeEvent_Max); |
495 BrowserChildProcessHost::OnChildDied(); | 489 BrowserChildProcessHost::OnChildDied(); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 561 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
568 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || | 562 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || |
569 blacklist->LoadGpuBlacklist(gpu_blacklist_json.as_string(), true)) { | 563 blacklist->LoadGpuBlacklist(gpu_blacklist_json.as_string(), true)) { |
570 gpu_blacklist_.reset(blacklist); | 564 gpu_blacklist_.reset(blacklist); |
571 return true; | 565 return true; |
572 } | 566 } |
573 delete blacklist; | 567 delete blacklist; |
574 return false; | 568 return false; |
575 } | 569 } |
576 | 570 |
OLD | NEW |