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

Side by Side Diff: chrome/common/extensions/docs/examples/extensions/benchmark/script.js

Issue 11745015: Update references to the extension messaging APIs to point to the "runtime" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
1 // The port for communicating back to the extension. 5 // The port for communicating back to the extension.
2 var benchmarkExtensionPort = chrome.extension.connect(); 6 var benchmarkExtensionPort = chrome.runtime.connect();
3 7
4 // The url is what this page is known to the benchmark as. 8 // The url is what this page is known to the benchmark as.
5 // The benchmark uses this id to differentiate the benchmark's 9 // The benchmark uses this id to differentiate the benchmark's
6 // results from random pages being browsed. 10 // results from random pages being browsed.
7 11
8 // TODO(mbelshe): If the page redirects, the location changed and the 12 // TODO(mbelshe): If the page redirects, the location changed and the
9 // benchmark stalls. 13 // benchmark stalls.
10 var benchmarkExtensionUrl = window.location.toString(); 14 var benchmarkExtensionUrl = window.location.toString();
11 15
12 // Compute max/min/avg dom tree depth. 16 // Compute max/min/avg dom tree depth.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 domNum: dom.length, 70 domNum: dom.length,
67 domDepths: depths }); 71 domDepths: depths });
68 } else { 72 } else {
69 window.setTimeout(sendTimesToExtension, 100); 73 window.setTimeout(sendTimesToExtension, 100);
70 } 74 }
71 } 75 }
72 76
73 // We can't use the onload event because this script runs at document idle, 77 // We can't use the onload event because this script runs at document idle,
74 // which may run after the onload has completed. 78 // which may run after the onload has completed.
75 sendTimesToExtension(); 79 sendTimesToExtension();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698