Chromium Code Reviews| Index: tracing/tracing/extras/chrome/blame_context/toplevel.html |
| diff --git a/tracing/tracing/extras/chrome/blame_context/toplevel.html b/tracing/tracing/extras/chrome/blame_context/toplevel.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2e3ef7c47cd63cad300bfc8a3060ad46c2efb26f |
| --- /dev/null |
| +++ b/tracing/tracing/extras/chrome/blame_context/toplevel.html |
| @@ -0,0 +1,52 @@ |
| +<!DOCTYPE html> |
| +<!-- |
| +Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| +Use of this source code is governed by a BSD-style license that can be |
| +found in the LICENSE file. |
| +--> |
| + |
| +<link rel="import" href="/tracing/extras/chrome/blame_context/blame_context.html"> |
| + |
| +<script> |
| +'use strict'; |
| + |
| +tr.exportTo('tr.e.chrome', function() { |
| + var constants = tr.e.cc.constants; |
| + |
| + var BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot; |
| + var BlameContextInstance = tr.e.chrome.BlameContextInstance; |
| + |
| + function TopLevelSnapshot() { |
| + BlameContextSnapshot.apply(this, arguments); |
| + } |
| + |
| + TopLevelSnapshot.prototype = { |
|
petrcermak
2016/05/24 10:54:10
nit: The name of this file should probably be top_
Xiaocheng
2016/05/25 10:17:47
Done.
|
| + __proto__: BlameContextSnapshot.prototype, |
| + |
| + get userFriendlyName() { |
| + return 'TopLevel'; |
| + } |
| + }; |
| + |
| + tr.model.ObjectSnapshot.register( |
| + TopLevelSnapshot, |
| + {typeName: 'TopLevel'}); |
| + |
| + function TopLevelInstance() { |
| + BlameContextInstance.apply(this, arguments); |
| + } |
| + |
| + TopLevelInstance.prototype = { |
| + __proto__: BlameContextInstance.prototype |
| + }; |
| + |
| + tr.model.ObjectInstance.register( |
| + TopLevelInstance, |
| + {typeName: 'TopLevel'}); |
| + |
| + return { |
| + TopLevelSnapshot: TopLevelSnapshot, |
| + TopLevelInstance: TopLevelInstance |
| + }; |
| +}); |
| +</script> |