Index: chrome/browser/gpu_process_host_ui_shim.h |
=================================================================== |
--- chrome/browser/gpu_process_host_ui_shim.h (revision 69024) |
+++ chrome/browser/gpu_process_host_ui_shim.h (working copy) |
@@ -11,7 +11,9 @@ |
// portion of this class, the GpuProcessHost, is responsible for |
// shuttling messages between the browser and GPU processes. |
+#include "base/callback.h" |
#include "base/non_thread_safe.h" |
+#include "base/scoped_ptr.h" |
#include "base/singleton.h" |
#include "chrome/common/gpu_info.h" |
#include "chrome/common/message_router.h" |
@@ -54,6 +56,13 @@ |
// Return all known information about the GPU. |
const GPUInfo& gpu_info() const; |
+ // Used only in testing. Sets a callback to invoke when GPU info is collected, |
+ // regardless of whether it has been collected already or if it is partial |
+ // or complete info. Set to NULL when the callback should no longer be called. |
+ void set_gpu_info_collected_callback(Callback0::Type* callback) { |
+ gpu_info_collected_callback_.reset(callback); |
+ } |
+ |
private: |
friend struct DefaultSingletonTraits<GpuProcessHostUIShim>; |
@@ -70,6 +79,10 @@ |
GPUInfo gpu_info_; |
MessageRouter router_; |
+ |
+ // Used only in testing. If set, the callback is invoked when the GPU info |
+ // has been collected. |
+ scoped_ptr<Callback0::Type> gpu_info_collected_callback_; |
}; |
#endif // CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |