Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1821)

Unified Diff: chrome/browser/gpu_process_host_ui_shim.h

Issue 5698009: Wait for the GPU info to be collected. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | chrome/browser/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698