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

Side by Side Diff: chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/page.js

Issue 8826010: Update more manifests to manifest_version 2 (Closed) Base URL: svn://svn.chromium.org/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.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
1 var win = window; 5 var win = window;
2 if (typeof(contentWindow) != 'undefined') { 6 if (typeof(contentWindow) != 'undefined') {
3 win = contentWindow; 7 win = contentWindow;
4 } 8 }
5 9
6 chrome.extension.onConnect.addListener(function(port) { 10 chrome.extension.onConnect.addListener(function(port) {
7 console.log('connected'); 11 console.log('connected');
8 port.onMessage.addListener(function(msg) { 12 port.onMessage.addListener(function(msg) {
9 console.log('got ' + msg); 13 console.log('got ' + msg);
10 if (msg.testPostMessage) { 14 if (msg.testPostMessage) {
(...skipping 24 matching lines...) Expand all
35 }); 39 });
36 console.log('posted message'); 40 console.log('posted message');
37 } 41 }
38 42
39 // Workaround two bugs: shutdown crash if we hook 'unload', and content script 43 // Workaround two bugs: shutdown crash if we hook 'unload', and content script
40 // GC if we don't register any event handlers. 44 // GC if we don't register any event handlers.
41 // http://code.google.com/p/chromium/issues/detail?id=17410 45 // http://code.google.com/p/chromium/issues/detail?id=17410
42 // http://code.google.com/p/chromium/issues/detail?id=17582 46 // http://code.google.com/p/chromium/issues/detail?id=17582
43 function foo() {} 47 function foo() {}
44 win.addEventListener('error', foo); 48 win.addEventListener('error', foo);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698