Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / examples / chrome_inspect_test_shell.html
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 Copyright (c) 2011 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
7 -->
8 <head>
9 <title>chrome://inspect test shell</title>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11
12 <script src="/components/platform/platform.js"></script>
13
14 <link rel="import" href="/components/polymer/polymer.html">
15 <link rel="import" href="/about_tracing/profiling_view.html">
16
17 <style>
18   body {
19     margin: 0;
20     padding: 0;
21     width: 100%;
22     height: 100%;
23     display: -webkit-flex;
24     -webkit-flex-direction: column;
25   }
26
27   body > x-profiling-view {
28     -webkit-flex: 1 1 auto;
29     overflow: hidden;
30     position: absolute;
31     top: 0px;
32     bottom: 0;
33     left: 0;
34     right: 0;
35   }
36
37 </style>
38 </head>
39 <body>
40   <script>
41   'use strict';
42
43   var profilingViewEl;
44
45   function onLoad() {
46     if (window.InspectorFrontendHost === undefined) {
47       tv.showPanic(
48           'This page only works when launched from chrome://inspect',
49           'Try going to ' +
50           'chrome://inspect/?browser-inspector=' +
51           'http://localhost:8003/examples/chrome_inspect_test_shell.html' +
52           '#devices ' +
53           'and then clicking the inspect link on a browser');
54
55       return;
56     }
57
58     var tracingControllerClient = new about_tracing.InspectorTracingControllerClient();
59     profilingViewEl = new about_tracing.ProfilingView(tracingControllerClient);
60     document.body.appendChild(profilingViewEl);
61   }
62   window.addEventListener('load', onLoad);
63   </script>
64 </body>
65 </html>