Index: chrome/common/extensions/docs/examples/extensions/plugin_settings/js/main.js |
diff --git a/chrome/common/extensions/docs/examples/extensions/plugin_settings/js/main.js b/chrome/common/extensions/docs/examples/extensions/plugin_settings/js/main.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1b6156641d700530a874a48359f4680decec1099 |
--- /dev/null |
+++ b/chrome/common/extensions/docs/examples/extensions/plugin_settings/js/main.js |
@@ -0,0 +1,16 @@ |
+// 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. |
+ |
+document.addEventListener('DOMContentLoaded', function() { |
+ chrome.contentSettings.plugins.getResourceIdentifiers(function(r) { |
+ if (chrome.extension.lastError) { |
+ $('error').textContent = |
+ "Error: " + chrome.extension.lastError.message; |
+ return; |
Mike West
2011/10/25 19:52:06
This means that if the extension ever errors out,
Bernhard Bauer
2011/10/26 13:55:18
I'm not sure there would be much to fix in that ca
|
+ } |
+ var pluginList = $('plugin-list'); |
+ pluginSettings.ui.PluginList.decorate(pluginList); |
+ pluginList.dataModel = new cr.ui.ArrayDataModel(r); |
+ }); |
+}); |