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

Side by Side Diff: chrome/test/data/extensions/devtools/timeline_api_two/background_two.js

Issue 12281003: Remove extension process side of chrome.devtools API, it's obsolete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
(Empty)
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
5 var devtoolsTabEvents = undefined;
6
7 function pageEventListener() {
8 receivedEvents.push("onPageEvent");
9 }
10
11 function tabCloseListener() {
12 receivedEvents.push("onTabClose");
13 }
14
15 function registerListenersForTab(tabId) {
16 devtoolsTabEvents = chrome.devtools.getTabEvents(tabId);
17 devtoolsTabEvents.onPageEvent.addListener(pageEventListener);
18 devtoolsTabEvents.onTabClose.addListener(tabCloseListener);
19 window.domAutomationController.send(true);
20 }
21
22 function unregisterListeners() {
23 devtoolsTabEvents.onPageEvent.removeListener(pageEventListener);
24 devtoolsTabEvents.onTabClose.removeListener(tabCloseListener);
25 window.domAutomationController.send(true);
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698