OLD | NEW |
(Empty) | |
| 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 cr.define('options', function() { |
| 6 |
| 7 ///////////////////////////////////////////////////////////////////////////// |
| 8 // AppCookiesView class: |
| 9 |
| 10 /** |
| 11 * Encapsulated handling of app cookies and other data page. It |
| 12 * derives from the regular CookiesView. |
| 13 * @constructor |
| 14 */ |
| 15 function AppCookiesView(model) { |
| 16 options.OptionsPage.call(this, 'app-cookies', |
| 17 loadTimeData.getString('cookiesViewPageTabTitle'), |
| 18 'app-cookies-view-page'); |
| 19 } |
| 20 |
| 21 cr.addSingletonGetter(AppCookiesView); |
| 22 |
| 23 AppCookiesView.prototype = { |
| 24 __proto__: options.CookiesView.prototype, |
| 25 |
| 26 isAppContext: function() { |
| 27 return true; |
| 28 }, |
| 29 }; |
| 30 |
| 31 // CookiesViewHandler callbacks. |
| 32 AppCookiesView.onTreeItemAdded = function(args) { |
| 33 $('app-cookies-list').addByParentId(args[0], args[1], args[2]); |
| 34 }; |
| 35 |
| 36 AppCookiesView.onTreeItemRemoved = function(args) { |
| 37 $('app-cookies-list').removeByParentId(args[0], args[1], args[2]); |
| 38 }; |
| 39 |
| 40 AppCookiesView.loadChildren = function(args) { |
| 41 $('app-cookies-list').loadChildren(args[0], args[1]); |
| 42 }; |
| 43 |
| 44 // Export |
| 45 return { |
| 46 AppCookiesView: AppCookiesView |
| 47 }; |
| 48 |
| 49 }); |
OLD | NEW |