OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var api = (function() { | 5 var api = (function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * Enumeration of scene update commands. | 9 * Enumeration of scene update commands. |
10 * @enum {number} | 10 * @enum {number} |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 /** | 95 /** |
96 * Notify native scene management that DOM loading has completed, at the | 96 * Notify native scene management that DOM loading has completed, at the |
97 * specified page size. | 97 * specified page size. |
98 */ | 98 */ |
99 function domLoaded() { | 99 function domLoaded() { |
100 chrome.send('domLoaded'); | 100 chrome.send('domLoaded'); |
101 } | 101 } |
102 | 102 |
103 /** | 103 /** |
| 104 * Sets the CSS size for this page. |
| 105 */ |
| 106 function setUiCssSize(width, height, dpr) { |
| 107 chrome.send('setUiCssSize', [width, height, dpr]); |
| 108 } |
| 109 |
| 110 /** |
104 * Represents updates to UI element properties. Any properties set on this | 111 * Represents updates to UI element properties. Any properties set on this |
105 * object are relayed to an underlying native element via scene command. | 112 * object are relayed to an underlying native element via scene command. |
106 * Properties that are not set on this object are left unchanged. | 113 * Properties that are not set on this object are left unchanged. |
107 */ | 114 */ |
108 class UiElementUpdate { | 115 class UiElementUpdate { |
109 | 116 |
110 setIsContentQuad() { | 117 setIsContentQuad() { |
111 this.contentQuad = true; | 118 this.contentQuad = true; |
112 } | 119 } |
113 | 120 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 Easing: Easing, | 306 Easing: Easing, |
300 Command: Command, | 307 Command: Command, |
301 Action: Action, | 308 Action: Action, |
302 Mode: Mode, | 309 Mode: Mode, |
303 getContentElementId: getContentElementId, | 310 getContentElementId: getContentElementId, |
304 UiElement: UiElement, | 311 UiElement: UiElement, |
305 UiElementUpdate: UiElementUpdate, | 312 UiElementUpdate: UiElementUpdate, |
306 Animation: Animation, | 313 Animation: Animation, |
307 doAction: doAction, | 314 doAction: doAction, |
308 domLoaded: domLoaded, | 315 domLoaded: domLoaded, |
| 316 setUiCssSize: setUiCssSize, |
309 }; | 317 }; |
310 })(); | 318 })(); |
OLD | NEW |