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 #ifndef CHROME_BROWSER_GPU_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_GPU_PROCESS_HOST_H_ |
6 #define CHROME_BROWSER_GPU_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_GPU_PROCESS_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
10 #include "chrome/browser/browser_child_process_host.h" | 10 #include "chrome/browser/browser_child_process_host.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 private: | 33 private: |
34 explicit GpuProcessHost(int host_id); | 34 explicit GpuProcessHost(int host_id); |
35 virtual ~GpuProcessHost(); | 35 virtual ~GpuProcessHost(); |
36 bool Init(); | 36 bool Init(); |
37 | 37 |
38 // Post an IPC message to the UI shim's message handler on the UI thread. | 38 // Post an IPC message to the UI shim's message handler on the UI thread. |
39 void RouteOnUIThread(const IPC::Message& message); | 39 void RouteOnUIThread(const IPC::Message& message); |
40 | 40 |
41 virtual bool CanShutdown(); | 41 virtual bool CanShutdown(); |
| 42 virtual void OnProcessLaunched(); |
42 virtual void OnChildDied(); | 43 virtual void OnChildDied(); |
43 virtual void OnProcessCrashed(int exit_code); | 44 virtual void OnProcessCrashed(int exit_code); |
44 | 45 |
45 bool CanLaunchGpuProcess() const; | 46 bool CanLaunchGpuProcess() const; |
46 bool LaunchGpuProcess(); | 47 bool LaunchGpuProcess(); |
47 | 48 |
48 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. | 49 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. |
49 int host_id_; | 50 int host_id_; |
50 | 51 |
51 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 52 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
52 }; | 53 }; |
53 | 54 |
54 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ | 55 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ |
OLD | NEW |