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

Unified Diff: chrome/common/extensions/docs/examples/api/windows/merge_windows/background.html

Issue 8318001: Adding `content_security_policy` to a few sample extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Docs. Zips. Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/examples/api/windows/merge_windows/background.html
diff --git a/chrome/common/extensions/docs/examples/api/windows/merge_windows/background.html b/chrome/common/extensions/docs/examples/api/windows/merge_windows/background.html
index 6575af892dcf15435ecd9fad18639cbeae36b086..078ea4558a08ced4dc1b490a6dc54709bc5c32b5 100644
--- a/chrome/common/extensions/docs/examples/api/windows/merge_windows/background.html
+++ b/chrome/common/extensions/docs/examples/api/windows/merge_windows/background.html
@@ -1,49 +1,9 @@
+<!doctype html>
<html>
<head>
- <script>
- var targetWindow = null;
- var tabCount = 0;
-
- function start(tab) {
- chrome.windows.getCurrent(getWindows);
- }
-
- function getWindows(win) {
- targetWindow = win;
- chrome.tabs.getAllInWindow(targetWindow.id, getTabs);
- }
-
- function getTabs(tabs) {
- tabCount = tabs.length;
- // We require all the tab information to be populated.
- chrome.windows.getAll({"populate" : true}, moveTabs);
- }
-
- function moveTabs(windows) {
- var numWindows = windows.length;
- var tabPosition = tabCount;
-
- for (var i = 0; i < numWindows; i++) {
- var win = windows[i];
-
- if (targetWindow.id != win.id) {
- var numTabs = win.tabs.length;
-
- for (var j = 0; j < numTabs; j++) {
- var tab = win.tabs[j];
-
- // Move the tab into the window that triggered the browser action.
- chrome.tabs.move(tab.id,
- {"windowId": targetWindow.id, "index": tabPosition});
-
- tabPosition++;
- }
- }
- }
- }
-
- // Set up a click handler so that we can merge all the windows.
- chrome.browserAction.onClicked.addListener(start);
- </script>
+ <title>Background Page</title>
+ <script src="background.js"></script>
</head>
-</html>
+ <body>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698