Chromium Code Reviews| Index: chrome/browser/resources/options2/cookies_view_app.js |
| diff --git a/chrome/browser/resources/options2/cookies_view_app.js b/chrome/browser/resources/options2/cookies_view_app.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9bf9fb147a0f22f6f650ab197ed8b878afe346fb |
| --- /dev/null |
| +++ b/chrome/browser/resources/options2/cookies_view_app.js |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 2012 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. |
| + |
| +cr.define('options', function() { |
| + |
| + ///////////////////////////////////////////////////////////////////////////// |
| + // AppCookiesView class: |
|
Evan Stade
2012/07/03 18:11:28
name of the file should match name of the class
nasko
2012/07/09 17:07:06
Done.
|
| + |
| + /** |
| + * Encapsulated handling of app cookies and other data page. It |
| + * derives from the regular CookiesView. |
| + * @constructor |
| + */ |
| + function AppCookiesView(model) { |
| + options.OptionsPage.call(this, 'app-cookies', |
| + loadTimeData.getString('cookiesViewPageTabTitle'), |
| + 'app-cookies-view-page'); |
| + } |
| + |
| + cr.addSingletonGetter(AppCookiesView); |
| + |
| + AppCookiesView.prototype = { |
| + __proto__: options.CookiesView.prototype, |
| + |
| + isAppContext: function() { |
| + return true; |
| + }, |
| + }; |
| + |
| + // CookiesViewHandler callbacks. |
| + AppCookiesView.onTreeItemAdded = function(args) { |
| + $('app-cookies-list').addByParentId(args[0], args[1], args[2]); |
| + }; |
| + |
| + AppCookiesView.onTreeItemRemoved = function(args) { |
| + $('app-cookies-list').removeByParentId(args[0], args[1], args[2]); |
| + }; |
| + |
| + AppCookiesView.loadChildren = function(args) { |
| + $('app-cookies-list').loadChildren(args[0], args[1]); |
| + }; |
| + |
| + // Export |
| + return { |
| + AppCookiesView: AppCookiesView |
| + }; |
| + |
|
Evan Stade
2012/07/03 18:11:28
remove extra line
nasko
2012/07/09 17:07:06
Done.
|
| +}); |