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

Side by Side Diff: chrome/test/data/extensions/api_test/page_action/hash_change/background.html

Issue 8763008: Move yet another block of tests 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 <!-- 1 <!--
2 * Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
3 * source code is governed by a BSD-style license that can be found in the 3 * source code is governed by a BSD-style license that can be found in the
4 * LICENSE file. 4 * LICENSE file.
5 --> 5 -->
6 <html> 6 <html>
7 <head> 7 <head>
8 <script> 8 <script src="background.js"></script>
9 // This makes sure we only enable the page action once per tab.
10 var hasEnabled = {};
11
12 chrome.extension.onRequest.addListener(function(request, sender) {
13 if (request.msg == "feedIcon") {
14 console.log('url: ' + sender.tab.url);
15
16 if (!hasEnabled[sender.tab.id]) {
17 console.log('Enabling for ' + sender.tab.id);
18
19 // We have received a list of feed urls found on the page.
20 // Enable the page action icon.
21 chrome.pageAction.setTitle({ tabId: sender.tab.id,
22 title: "Page action..."});
23 chrome.pageAction.show(sender.tab.id);
24 hasEnabled[sender.tab.id] = true;
25 hasEnabledLastTabId = sender.tab.id;
26 } else {
27 console.log('We are not doing this more than once (for ' +
28 sender.tab.id + ')');
29 }
30 }
31 });
32
33 </script>
34 </head> 9 </head>
35 </html> 10 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698