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

Side by Side Diff: chrome/common/extensions/docs/examples/api/debugger/pause-resume/background.js

Issue 9289057: Changing manifest to v2 extension samples (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing nits from Mike feedback Created 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
abarth-chromium 2012/01/29 19:24:05 Why update the copyright year? There aren't any c
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 var attachedTabs = {}; 5 var attachedTabs = {};
6 var version = "0.1"; 6 var version = "0.1";
7 7
8 chrome.debugger.onEvent.addListener(onEvent); 8 chrome.debugger.onEvent.addListener(onEvent);
9 chrome.debugger.onDetach.addListener(onDetach); 9 chrome.debugger.onDetach.addListener(onDetach);
10 10
11 chrome.browserAction.onClicked.addListener(function() { 11 chrome.browserAction.onClicked.addListener(function() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 chrome.browserAction.setTitle({tabId:tabId, title:"Resume JavaScript"}); 54 chrome.browserAction.setTitle({tabId:tabId, title:"Resume JavaScript"});
55 } 55 }
56 } 56 }
57 57
58 function onDetach(debuggeeId) { 58 function onDetach(debuggeeId) {
59 var tabId = debuggeeId.tabId; 59 var tabId = debuggeeId.tabId;
60 delete attachedTabs[tabId]; 60 delete attachedTabs[tabId];
61 chrome.browserAction.setIcon({tabId:tabId, path:"debuggerPause.png"}); 61 chrome.browserAction.setIcon({tabId:tabId, path:"debuggerPause.png"});
62 chrome.browserAction.setTitle({tabId:tabId, title:"Pause JavaScript"}); 62 chrome.browserAction.setTitle({tabId:tabId, title:"Pause JavaScript"});
63 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698