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

Side by Side Diff: chrome/browser/extensions/extension_webstore_private_api.h

Issue 8772031: Add a JS API for detecting WebGL availability. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/extensions/extension_function.h" 11 #include "chrome/browser/extensions/extension_function.h"
12 #include "chrome/browser/extensions/extension_install_ui.h" 12 #include "chrome/browser/extensions/extension_install_ui.h"
13 #include "chrome/browser/extensions/webstore_install_helper.h" 13 #include "chrome/browser/extensions/webstore_install_helper.h"
14 #include "chrome/browser/extensions/webstore_installer.h" 14 #include "chrome/browser/extensions/webstore_installer.h"
15 #include "chrome/common/net/gaia/google_service_auth_error.h" 15 #include "chrome/common/net/gaia/google_service_auth_error.h"
16 #include "content/browser/gpu/gpu_data_manager.h"
16 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
17 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
18 19
19 class ProfileSyncService; 20 class ProfileSyncService;
20 21
21 class WebstorePrivateApi { 22 class WebstorePrivateApi {
22 public: 23 public:
23 // Allows you to set the ProfileSyncService the function will use for 24 // Allows you to set the ProfileSyncService the function will use for
24 // testing purposes. 25 // testing purposes.
25 static void SetTestingProfileSyncService(ProfileSyncService* service); 26 static void SetTestingProfileSyncService(ProfileSyncService* service);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 class GetStoreLoginFunction : public SyncExtensionFunction { 153 class GetStoreLoginFunction : public SyncExtensionFunction {
153 virtual bool RunImpl() OVERRIDE; 154 virtual bool RunImpl() OVERRIDE;
154 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getStoreLogin"); 155 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getStoreLogin");
155 }; 156 };
156 157
157 class SetStoreLoginFunction : public SyncExtensionFunction { 158 class SetStoreLoginFunction : public SyncExtensionFunction {
158 virtual bool RunImpl() OVERRIDE; 159 virtual bool RunImpl() OVERRIDE;
159 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.setStoreLogin"); 160 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.setStoreLogin");
160 }; 161 };
161 162
163 class GetWebGLStatusFunction : public AsyncExtensionFunction,
164 public GpuDataManager::Observer {
165 public:
166 GetWebGLStatusFunction();
167 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.
168
169 protected:
170 virtual ~GetWebGLStatusFunction();
171 virtual bool RunImpl() OVERRIDE;
172
173 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.
174
175 // A false return value is always valid, but a true one is only valid if full
176 // GPU info has been collected in a GPU process.
177 static bool IsWebGLAllowed(GpuDataManager* manager);
178
179 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getWebGLStatus");
180 };
181
162 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ 182 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698