Index: chrome/browser/resources/pdf/elements/viewer-bookmark/viewer-bookmark.js |
diff --git a/chrome/browser/resources/pdf/elements/viewer-bookmark/viewer-bookmark.js b/chrome/browser/resources/pdf/elements/viewer-bookmark/viewer-bookmark.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a2ca92b4cec4c5a14fd8c840d75c3b8b7bed014b |
--- /dev/null |
+++ b/chrome/browser/resources/pdf/elements/viewer-bookmark/viewer-bookmark.js |
@@ -0,0 +1,21 @@ |
+// 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('viewer-bookmark', { |
+ |
+ /** |
+ * @type {Object} |
+ * A bookmark object, each containing a: |
+ * - title |
+ * - page (optional) |
+ * - children (an array of bookmarks) |
+ */ |
+ bookmark: null, |
+ |
+ onClick: function() { |
+ if (this.bookmark.hasOwnProperty('page')) |
+ this.fire('changePage', {page: this.bookmark.page}); |
+ }, |
+ |
+}); |