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

Side by Side Diff: examples/browser/browser.sky

Issue 874303003: Move sky-box,-button,-checkbox,-radio out of their directories (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | examples/window_manager/debug_panel.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!mojo mojo:sky_viewer 1 #!mojo mojo:sky_viewer
2 <!-- 2 <!--
3 // Copyright 2014 The Chromium Authors. All rights reserved. 3 // Copyright 2014 The Chromium Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be 4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file. 5 // found in the LICENSE file.
6 --> 6 -->
7 <sky> 7 <sky>
8 8
9 <import src="/gen/examples/browser/browser_host.mojom.sky" as="example" /> 9 <import src="/gen/examples/browser/browser_host.mojom.sky" as="example" />
10 10
11 <import src="/sky/framework/embedder.sky" as="embedder" /> 11 <import src="/sky/framework/embedder.sky" as="embedder" />
12 <import src="/sky/framework/sky-box.sky"/>
12 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> 13 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
13 <import src="/sky/framework/sky-input.sky" /> 14 <import src="/sky/framework/sky-input.sky" />
14 <import src="/sky/framework/sky-box/sky-box.sky"/>
15 15
16 <sky-element name="browser-panel"> 16 <sky-element name="browser-panel">
17 <template> 17 <template>
18 <style> 18 <style>
19 div { 19 div {
20 display: flex; 20 display: flex;
21 } 21 }
22 </style> 22 </style>
23 23
24 <sky-input id="text" value="{{ url }}" on-keydown="handleKeyDown" /> 24 <sky-input id="text" value="{{ url }}" on-keydown="handleKeyDown" />
25 </template> 25 </template>
26 <script> 26 <script>
27 module.exports = class extends SkyElement { 27 module.exports = class extends SkyElement {
28 created() { 28 created() {
29 this.embedder = embedder.connectToEmbedderService(example.BrowserHost) 29 this.embedder = embedder.connectToEmbedderService(example.BrowserHost)
30 this.url = "http://"; 30 this.url = "http://";
31 } 31 }
32 32
33 handleKeyDown(event) { 33 handleKeyDown(event) {
34 if (event.key == 0xD) 34 if (event.key == 0xD)
35 this.embedder.navigateTo(this.url); 35 this.embedder.navigateTo(this.url);
36 } 36 }
37 }.register(); 37 }.register();
38 </script> 38 </script>
39 </sky-element> 39 </sky-element>
40 40
41 <browser-panel /> 41 <browser-panel />
42 </sky> 42 </sky>
OLDNEW
« no previous file with comments | « no previous file | examples/window_manager/debug_panel.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698