Removed 'anonymous' from namespace, added whitespace in thread_restrictions.cc
[chromium-blink-merge.git] / ui / accessibility / extensions / alt / background.js
blob733a06ffc69df6997b0e3259adbe9c49a497c199
1 // Copyright 2014 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.
5 function injectScripts(opt_tab) {
6   chrome.tabs.executeScript({
7     file: 'lib/axs_testing.js',
8     allFrames: true
9   }, function() {
10     chrome.tabs.executeScript({
11       file: 'hide-images.js',
12       allFrames: true
13     }, function() {
14       chrome.tabs.insertCSS({
15         file: 'hide-images.css',
16         allFrames: true
17       }, function() {
18         chrome.tabs.executeScript({
19           code: 'toggleEnabled();',
20           allFrames: true
21         }, function() {
22           chrome.tabs.executeScript({
23             code: 'createInfobar();'
24           });
25         });
26       });
27     });
28   });
31 chrome.commands.onCommand.addListener(function(command) {
32   if (command == 'example_keyboard_command') {
33     injectScripts();
34   }
35 });
37 chrome.browserAction.onClicked.addListener(function(tab) {
38   injectScripts(tab);
39 });