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

Unified Diff: chrome/browser/resources/gpu_internals/browser_bridge.js

Issue 10910026: Show about:sandbox status in the about:gpu page. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Show about:sandbox status in the about:gpu page. Created 8 years, 3 months 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/resources/gpu_internals/info_view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/gpu_internals/browser_bridge.js
diff --git a/chrome/browser/resources/gpu_internals/browser_bridge.js b/chrome/browser/resources/gpu_internals/browser_bridge.js
index f47451592cd535214e1aa14542e6a83b9701e101..43d58dc3e1247395e7fe0e2d36f815c112963a00 100644
--- a/chrome/browser/resources/gpu_internals/browser_bridge.js
+++ b/chrome/browser/resources/gpu_internals/browser_bridge.js
@@ -26,6 +26,7 @@ cr.define('gpu', function() {
if (!this.debugMode_) {
chrome.send('browserBridgeInitialized');
this.beginRequestClientInfo_();
+ this.beginRequestSandboxInfo_();
this.beginRequestLogMessages_();
this.beginRequestCrashList_();
}
@@ -38,9 +39,11 @@ cr.define('gpu', function() {
// set up things according to the simulated data
this.gpuInfo_ = data.gpuInfo;
this.clientInfo_ = data.clientInfo;
+ this.sandboxInfo_ = data.sandboxInfo;
this.logMessages_ = data.logMessages;
cr.dispatchSimpleEvent(this, 'gpuInfoUpdate');
cr.dispatchSimpleEvent(this, 'clientInfoChange');
+ cr.dispatchSimpleEvent(this, 'sandboxInfoChange');
cr.dispatchSimpleEvent(this, 'logMessagesChange');
},
@@ -118,6 +121,28 @@ cr.define('gpu', function() {
},
/**
+ * This function begins a request for the SandboxInfo. If it comes back
+ * as undefined, then we will issue the request again in 250ms.
+ */
+ beginRequestSandboxInfo_: function() {
+ this.callAsync('requestSandboxInfo', undefined, (function(data) {
+ if (data === undefined) { // try again in 250 ms
+ window.setTimeout(this.beginRequestSandboxInfo_.bind(this), 250);
+ } else {
+ this.sandboxInfo_ = data;
+ cr.dispatchSimpleEvent(this, 'sandboxInfoChange');
+ }
+ }).bind(this));
+ },
+
+ /**
+ * Returns information about the currently runnign Chrome sandbox.
+ */
+ get sandboxInfo() {
+ return this.sandboxInfo_;
+ },
+
+ /**
* This function checks for new GPU_LOG messages.
* If any are found, a refresh is triggered.
*/
« no previous file with comments | « no previous file | chrome/browser/resources/gpu_internals/info_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698