diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 17:24:04 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 17:24:04 +0000 |
commit | 878761aef2460c1c2b8922e3e4c5da234f5c7b60 (patch) | |
tree | 56773b33766fd514c5162cdf152e04ab536b61c3 /chrome/browser/gpu_process_host_ui_shim.h | |
parent | 5c91bbc6ae963864ca27dd9fb6633dbf824cb2fd (diff) | |
download | chromium_src-878761aef2460c1c2b8922e3e4c5da234f5c7b60.zip chromium_src-878761aef2460c1c2b8922e3e4c5da234f5c7b60.tar.gz chromium_src-878761aef2460c1c2b8922e3e4c5da234f5c7b60.tar.bz2 |
Wait for the GPU info to be collected.
BUG=59131
TEST=none
Review URL: http://codereview.chromium.org/5698009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gpu_process_host_ui_shim.h')
-rw-r--r-- | chrome/browser/gpu_process_host_ui_shim.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/gpu_process_host_ui_shim.h b/chrome/browser/gpu_process_host_ui_shim.h index 8b09067..d0d0f37 100644 --- a/chrome/browser/gpu_process_host_ui_shim.h +++ b/chrome/browser/gpu_process_host_ui_shim.h @@ -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 @@ class GpuProcessHostUIShim : public IPC::Channel::Sender, // 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 @@ class GpuProcessHostUIShim : public IPC::Channel::Sender, 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_ |