Home | History | Annotate | Download | only in tracing_examples
      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 <link rel="import" href="/tracing/ui/base/base.html">
     13 <link rel="import" href="/tracing/ui/extras/about_tracing/profiling_view.html">
     14 
     15 <style>
     16   body {
     17     margin: 0;
     18     padding: 0;
     19     width: 100%;
     20     height: 100%;
     21     display: -webkit-flex;
     22     -webkit-flex-direction: column;
     23   }
     24 
     25   body > x-profiling-view {
     26     -webkit-flex: 1 1 auto;
     27     overflow: hidden;
     28     position: absolute;
     29     top: 0px;
     30     bottom: 0;
     31     left: 0;
     32     right: 0;
     33   }
     34 
     35 </style>
     36 </head>
     37 <body>
     38   <script>
     39   'use strict';
     40 
     41   var profilingViewEl;
     42 
     43   function onLoad() {
     44     if (window.DevToolsHost === undefined) {
     45       tr.showPanic(
     46           'This page only works when launched from chrome://inspect',
     47           'Try going to ' +
     48           'chrome://inspect/?browser-inspector=' +
     49           'http://localhost:8003/examples/chrome_inspect_test_shell.html' +
     50           '#devices ' +
     51           'and then clicking the inspect link on a browser');
     52 
     53       return;
     54     }
     55 
     56     var tracingControllerClient = new tr.ui.e.about_tracing.InspectorTracingControllerClient(); // @suppress longLineCheck
     57     profilingViewEl = new tr.ui.e.about_tracing.ProfilingView(tracingControllerClient); // @suppress longLineCheck
     58     document.body.appendChild(profilingViewEl);
     59   }
     60   window.addEventListener('load', onLoad);
     61   </script>
     62 </body>
     63 </html>
     64