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_UI_SHIM_H_ | 5 #ifndef CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |
6 #define CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ | 6 #define CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // This class lives on the UI thread and supports classes like the | 9 // This class lives on the UI thread and supports classes like the |
10 // BackingStoreProxy, which must live on the UI thread. The IO thread | 10 // BackingStoreProxy, which must live on the UI thread. The IO thread |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // dispatch the incoming messages from the GPU process, which are | 44 // dispatch the incoming messages from the GPU process, which are |
45 // actually received on the IO thread. | 45 // actually received on the IO thread. |
46 virtual bool OnMessageReceived(const IPC::Message& message); | 46 virtual bool OnMessageReceived(const IPC::Message& message); |
47 | 47 |
48 // See documentation on MessageRouter for AddRoute and RemoveRoute | 48 // See documentation on MessageRouter for AddRoute and RemoveRoute |
49 void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); | 49 void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); |
50 void RemoveRoute(int32 routing_id); | 50 void RemoveRoute(int32 routing_id); |
51 | 51 |
52 // Sends a message to the browser process to collect the information from the | 52 // Sends a message to the browser process to collect the information from the |
53 // graphics card. | 53 // graphics card. |
54 void CollectGraphicsInfoAsynchronously(); | 54 void CollectGraphicsInfoAsynchronously(GPUInfo::Level level); |
55 | 55 |
56 // Tells the GPU process to crash. Useful for testing. | 56 // Tells the GPU process to crash. Useful for testing. |
57 void SendAboutGpuCrash(); | 57 void SendAboutGpuCrash(); |
58 | 58 |
59 // Tells the GPU process to let its main thread enter an infinite loop. | 59 // Tells the GPU process to let its main thread enter an infinite loop. |
60 // Useful for testing. | 60 // Useful for testing. |
61 void SendAboutGpuHang(); | 61 void SendAboutGpuHang(); |
62 | 62 |
63 // Return all known information about the GPU. | 63 // Return all known information about the GPU. |
64 const GPUInfo& gpu_info() const; | 64 const GPUInfo& gpu_info() const; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 MessageRouter router_; | 103 MessageRouter router_; |
104 | 104 |
105 // Used only in testing. If set, the callback is invoked when the GPU info | 105 // Used only in testing. If set, the callback is invoked when the GPU info |
106 // has been collected. | 106 // has been collected. |
107 scoped_ptr<Callback0::Type> gpu_info_collected_callback_; | 107 scoped_ptr<Callback0::Type> gpu_info_collected_callback_; |
108 }; | 108 }; |
109 | 109 |
110 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ | 110 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |
111 | 111 |
OLD | NEW |