- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / docs / examples / extensions / plugin_settings / js / main.js
1 // Copyright (c) 2012 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.
4
5 /**
6  * @fileoverview Main entry point that creates a new plug-in list on document
7  * load.
8  */
9
10 document.addEventListener('DOMContentLoaded', function() {
11   chrome.contentSettings.plugins.getResourceIdentifiers(function(r) {
12     if (chrome.runtime.lastError) {
13       $('error').textContent =
14           'Error: ' + chrome.runtime.lastError.message;
15       return;
16     }
17     var pluginList = $('plugin-list');
18     pluginSettings.ui.PluginList.decorate(pluginList);
19     pluginList.dataModel = new cr.ui.ArrayDataModel(r);
20   });
21 });
22