Index: chrome/browser/extensions/extension_webstore_private_api.h |
=================================================================== |
--- chrome/browser/extensions/extension_webstore_private_api.h (revision 112998) |
+++ chrome/browser/extensions/extension_webstore_private_api.h (working copy) |
@@ -13,6 +13,7 @@ |
#include "chrome/browser/extensions/webstore_install_helper.h" |
#include "chrome/browser/extensions/webstore_installer.h" |
#include "chrome/common/net/gaia/google_service_auth_error.h" |
+#include "content/browser/gpu/gpu_data_manager.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -159,4 +160,23 @@ |
DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.setStoreLogin"); |
}; |
+class GetWebGLStatusFunction : public AsyncExtensionFunction, |
+ public GpuDataManager::Observer { |
+ public: |
+ GetWebGLStatusFunction(); |
+ virtual void OnGpuInfoUpdate() OVERRIDE; |
Mihai Parparita -not on Chrome
2011/12/07 00:01:38
A comment indicating that this implements GpuDataM
Zhenyao Mo
2011/12/07 17:26:51
Done.
|
+ |
+ protected: |
+ virtual ~GetWebGLStatusFunction(); |
+ virtual bool RunImpl() OVERRIDE; |
+ |
+ void CreateResult(bool webgl_allowed); |
Mihai Parparita -not on Chrome
2011/12/07 00:01:38
CreateResult and IsWebGLAllowed should be private.
Zhenyao Mo
2011/12/07 17:26:51
Done.
|
+ |
+ // A false return value is always valid, but a true one is only valid if full |
+ // GPU info has been collected in a GPU process. |
+ static bool IsWebGLAllowed(GpuDataManager* manager); |
+ |
+ DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getWebGLStatus"); |
+}; |
+ |
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ |