Chromium Code Reviews| Index: chrome/browser/resources/media_router/elements/issue_banner/issue_banner.js |
| diff --git a/chrome/browser/resources/media_router/elements/issue_banner/issue_banner.js b/chrome/browser/resources/media_router/elements/issue_banner/issue_banner.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fa13a24e52a28e6a5e56323f308f1635da4c69c6 |
| --- /dev/null |
| +++ b/chrome/browser/resources/media_router/elements/issue_banner/issue_banner.js |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2015 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. |
| + |
| +Polymer('issue-banner', { |
| + publish: { |
| + /** |
| + * The issue to show. |
| + * |
| + * @attribute issue |
| + * @type {media_router.Issue} |
| + * @default: null |
| + */ |
| + issue: null |
| + }, |
| + |
| + /** |
| + * Fires an issue-action-click event. This is called when an issue action |
| + * is clicked. |
| + * |
| + * @param {!Event} event The event object. |
| + * @param {Object} detail The details of the event. |
|
James Hawkins
2015/04/06 21:52:48
Can you use a well-typed typedef instead of Object
apacible
2015/04/06 22:50:41
I talked to jlklein@ about these @params; detail i
|
| + * @param {!Element} sender Reference to clicked node. |
| + */ |
| + onClickAction: function(event, detail, sender) { |
| + this.fire('issue-action-click', { |
| + id: this.issue.id, |
| + actionType: parseInt(sender.title), |
| + helpURL: this.issue.helpURL |
| + }); |
| + } |
| +}); |