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 "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/thread.h" | 10 #include "base/thread.h" |
11 #include "chrome/browser/browser_process.h" | |
12 #include "chrome/browser/browser_thread.h" | 11 #include "chrome/browser/browser_thread.h" |
13 #include "chrome/browser/gpu_process_host_ui_shim.h" | 12 #include "chrome/browser/gpu_process_host_ui_shim.h" |
14 #include "chrome/browser/renderer_host/render_view_host.h" | 13 #include "chrome/browser/renderer_host/render_view_host.h" |
15 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 14 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
16 #include "chrome/browser/renderer_host/resource_message_filter.h" | 15 #include "chrome/browser/renderer_host/resource_message_filter.h" |
17 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 16 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
18 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/common/gpu_info.h" | 18 #include "chrome/common/gpu_info.h" |
20 #include "chrome/common/gpu_messages.h" | 19 #include "chrome/common/gpu_messages.h" |
21 #include "chrome/common/render_messages.h" | 20 #include "chrome/common/render_messages.h" |
22 #include "ipc/ipc_channel_handle.h" | 21 #include "ipc/ipc_channel_handle.h" |
23 #include "ipc/ipc_switches.h" | 22 #include "ipc/ipc_switches.h" |
24 #include "media/base/media_switches.h" | 23 #include "media/base/media_switches.h" |
25 | 24 |
26 #if defined(OS_LINUX) | 25 #if defined(OS_LINUX) |
27 #include <gdk/gdkwindow.h> | 26 // These two #includes need to come after render_messages.h. |
28 #include <gdk/gdkx.h> | 27 #include <gdk/gdkwindow.h> // NOLINT |
| 28 #include <gdk/gdkx.h> // NOLINT |
29 #include "app/x11_util.h" | 29 #include "app/x11_util.h" |
30 #include "gfx/gtk_native_view_id_manager.h" | 30 #include "gfx/gtk_native_view_id_manager.h" |
31 #include "gfx/size.h" | 31 #include "gfx/size.h" |
32 #endif | 32 #endif // defined(OS_LINUX) |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 enum GPUProcessLifetimeEvent { | 36 enum GPUProcessLifetimeEvent { |
37 kLaunched, | 37 kLaunched, |
38 kCrashed, | 38 kCrashed, |
39 kGPUProcessLifetimeEvent_Max | 39 kGPUProcessLifetimeEvent_Max |
40 }; | 40 }; |
41 | 41 |
42 // Tasks used by this file | 42 // Tasks used by this file |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 #elif defined(OS_POSIX) | 529 #elif defined(OS_POSIX) |
530 false, // Never use the zygote (GPU plugin can't be sandboxed). | 530 false, // Never use the zygote (GPU plugin can't be sandboxed). |
531 base::environment_vector(), | 531 base::environment_vector(), |
532 #endif | 532 #endif |
533 cmd_line); | 533 cmd_line); |
534 | 534 |
535 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", | 535 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", |
536 kLaunched, kGPUProcessLifetimeEvent_Max); | 536 kLaunched, kGPUProcessLifetimeEvent_Max); |
537 return true; | 537 return true; |
538 } | 538 } |
539 | |
OLD | NEW |