diff options
author | tsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-28 18:38:55 +0000 |
---|---|---|
committer | tsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-28 18:38:55 +0000 |
commit | 4ecbbdfcbe7dfcc2013c6cf431fc9d4f25e21315 (patch) | |
tree | a74f1189e458eb345d3d548f2f41b1c747da30d2 /chrome/browser/resources/task_manager/includes.js | |
parent | cafe4ad25440a7752f5a4d230adf29b16a4766b0 (diff) | |
download | chromium_src-4ecbbdfcbe7dfcc2013c6cf431fc9d4f25e21315.zip chromium_src-4ecbbdfcbe7dfcc2013c6cf431fc9d4f25e21315.tar.gz chromium_src-4ecbbdfcbe7dfcc2013c6cf431fc9d4f25e21315.tar.bz2 |
Apply content-security-policy directive to chrome://tasks page.
Review URL: http://codereview.chromium.org/7482035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/task_manager/includes.js')
-rw-r--r-- | chrome/browser/resources/task_manager/includes.js | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/chrome/browser/resources/task_manager/includes.js b/chrome/browser/resources/task_manager/includes.js new file mode 100644 index 0000000..cd4fa8c --- /dev/null +++ b/chrome/browser/resources/task_manager/includes.js @@ -0,0 +1,64 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This script includes additional resources via document.write(). Hence, it +// must be a separate script file loaded before other scripts which would +// reference the resources. + +var css = [ + 'list.css', + 'table.css', + 'menu.css', +]; + +var script = [ + 'local_strings.js', + 'i18n_template.js', + + 'util.js', + 'cr.js', + 'cr/ui.js', + 'cr/event_target.js', + 'cr/ui/array_data_model.js', + 'cr/ui/list_item.js', + 'cr/ui/list_selection_model.js', + 'cr/ui/list_single_selection_model.js', + 'cr/ui/list_selection_controller.js', + 'cr/ui/list.js', + + 'cr/ui/splitter.js', + 'cr/ui/table/table_splitter.js', + + 'cr/ui/table/table_column.js', + 'cr/ui/table/table_column_model.js', + 'cr/ui/table/table_header.js', + 'cr/ui/table/table_list.js', + 'cr/ui/table.js', + + 'cr/ui/grid.js', + + 'cr/ui/command.js', + 'cr/ui/position_util.js', + 'cr/ui/menu_item.js', + 'cr/ui/menu.js', + 'cr/ui/context_menu_handler.js', +]; + +(function() { + // Switch to 'test harness' mode when loading from a file url. + var isHarness = document.location.protocol == 'file:'; + + // In test harness mode we load resources from relative dirs. + var prefix = isHarness ? './shared/' : 'chrome://resources/'; + + for (var i = 0; i < css.length; ++i) { + document.write('<link href="' + prefix + 'css/' + css[i] + + '" rel="stylesheet"></link>'); + } + + for (var i = 0; i < script.length; ++i) { + document.write('<script src="' + prefix + 'js/' + script[i] + + '"><\/script>'); + } +})(); |