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

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

Issue 98073012: Add unit test for lock and unlock virtual keyboard feature (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/elements/kb-options-menu.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 -- Copyright 2013 The Chromium Authors. All rights reserved. 2 -- Copyright 2013 The Chromium Authors. All rights reserved.
3 -- Use of this source code is governed by a BSD-style license that can be 3 -- Use of this source code is governed by a BSD-style license that can be
4 -- found in the LICENSE file. 4 -- found in the LICENSE file.
5 --> 5 -->
6 6
7 <polymer-element name="kb-shift-key" 7 <polymer-element name="kb-shift-key"
8 attributes="lowerCaseKeysetId upperCaseKeysetId" 8 attributes="lowerCaseKeysetId upperCaseKeysetId"
9 class="shift dark" char="Shift" on-pointerout="{{out}}" extends="kb-key"> 9 class="shift dark" char="Shift" on-pointerout="{{out}}" extends="kb-key">
10 <script> 10 <script>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Populate double click transition details. 122 // Populate double click transition details.
123 var detail = {}; 123 var detail = {};
124 detail.char = this.char || this.textContent; 124 detail.char = this.char || this.textContent;
125 detail.toKeyset = this.upperCaseKeysetId; 125 detail.toKeyset = this.upperCaseKeysetId;
126 detail.nextKeyset = undefined; 126 detail.nextKeyset = undefined;
127 detail.callback = this.onDoubleClick; 127 detail.callback = this.onDoubleClick;
128 this.fire('enable-dbl', detail); 128 this.fire('enable-dbl', detail);
129 }, 129 },
130 130
131 generateLongPressTimer: function() { 131 generateLongPressTimer: function() {
132 return this.asyncMethod(function() { 132 return this.async(function() {
133 var detail = this.populateDetails(); 133 var detail = this.populateDetails();
134 if (state == KEY_STATES.LOCKED) { 134 if (state == KEY_STATES.LOCKED) {
135 // We don't care about the longpress if we are already 135 // We don't care about the longpress if we are already
136 // capitalized. 136 // capitalized.
137 return; 137 return;
138 } else { 138 } else {
139 state = KEY_STATES.LOCKED; 139 state = KEY_STATES.LOCKED;
140 detail.toKeyset = this.upperCaseKeysetId; 140 detail.toKeyset = this.upperCaseKeysetId;
141 detail.nextKeyset = undefined; 141 detail.nextKeyset = undefined;
142 } 142 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 case KEY_STATES.UNLOCKED: 245 case KEY_STATES.UNLOCKED:
246 return this.lowerCaseKeysetId; 246 return this.lowerCaseKeysetId;
247 default: 247 default:
248 return this.upperCaseKeysetId; 248 return this.upperCaseKeysetId;
249 } 249 }
250 }, 250 },
251 }); 251 });
252 })(); 252 })();
253 </script> 253 </script>
254 </polymer-element> 254 </polymer-element>
OLDNEW
« no previous file with comments | « ui/keyboard/resources/elements/kb-options-menu.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698