Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: ui/keyboard/resources/elements/kb-key.html

Issue 15176004: Web Component Virtual Keyboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use third_party polymer Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/keyboard/resources/constants.js ('k') | ui/keyboard/resources/elements/kb-keyboard.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!--
2 -- Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 -- Use of this source code is governed by a BSD-style license that can be
4 -- found in the LICENSE file.
5 -->
6
7 <element name="kb-key" attributes="toKeyset char repeat" on-pointerdown="down"
8 on-pointerup="up">
9 <template>
10 <style>
11 @host {
12 * {
13 -webkit-box-flex: 1;
14 display: -webkit-box;
15 position: relative;
16 background-position: center center;
17 background-repeat: no-repeat;
18 background-size: contain;
19 }
20 }
21 .key {
22 bottom: 0;
23 left: 0;
24 height: 1.2em;
25 margin: auto;
26 position: absolute;
27 right: 0;
28 top: 0;
29 text-align: center;
30 }
31 </style>
32 <div id="key" class="key">
33 <content></content>
34 </div>
35 </template>
36 <script>
37 Polymer.register(this, {
38 repeat: false,
39 down: function(event) {
40 var detail = {
41 char: this.char || this.textContent,
42 toKeyset: this.toKeyset,
43 repeat: this.repeat
44 };
45 this.send('key-down', detail);
46 },
47 up: function(event) {
48 var detail = {
49 char: this.char || this.textContent,
50 toKeyset: this.toKeyset
51 };
52 this.send('key-up', detail);
53 }
54 });
55 </script>
56 </element>
OLDNEW
« no previous file with comments | « ui/keyboard/resources/constants.js ('k') | ui/keyboard/resources/elements/kb-keyboard.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698