Chromium Code Reviews| Index: tracing/tracing/extras/chrome/blame_context/frame_blame_context_base.html |
| diff --git a/tracing/tracing/extras/chrome/blame_context/frame_blame_context_base.html b/tracing/tracing/extras/chrome/blame_context/frame_blame_context_base.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fb73646052de8f54ce83e073f0e0f4c9a083bbb1 |
| --- /dev/null |
| +++ b/tracing/tracing/extras/chrome/blame_context/frame_blame_context_base.html |
| @@ -0,0 +1,66 @@ |
| +<!DOCTYPE html> |
| +<!-- |
| +Copyright 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'; |
| + |
| +/** |
| + * @fileoverview FrameBlameContextBaseSnapshot/Context are the base classs of |
|
Sami
2016/05/27 14:03:09
typo: class
Xiaocheng
2016/05/30 07:55:55
Done.
|
| + * the browser-side FrameTreeNode and renderer-side RenderFrame, providing |
| + * uniformed access methods to and between the subclasses. |
| + * FrameBlameContextBaseSnapshot/Context themselves, however, should never be |
| + * instantiated directly. |
| + * |
| + */ |
| +tr.exportTo('tr.e.chrome', function() { |
| + var BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot; |
| + var BlameContextInstance = tr.e.chrome.BlameContextInstance; |
| + |
| + function FrameBlameContextBaseSnapshot() { |
| + BlameContextSnapshot.apply(this, arguments); |
| + } |
| + |
| + FrameBlameContextBaseSnapshot.prototype = { |
| + __proto__: BlameContextSnapshot.prototype, |
| + |
| + /** |
| + * If |this| is a browser side FrameTreeNodeSnapshot, returns its renderer |
| + * side RenderFrameSnapshot; Otherwise, do in the opposite direction. |
| + */ |
| + get crossProcessCounterpart() { |
| + throw new Error('Not implemented'); |
| + }, |
| + |
| + get url() { |
| + throw new Error('Not implemented'); |
| + }, |
| + |
| + get userFriendlyName() { |
| + return 'FrameBlameContextSnapshotBase'; |
| + } |
| + }; |
| + |
| + function FrameBlameContextBaseInstance() { |
| + BlameContextInstance.apply(this, arguments); |
| + } |
| + |
| + FrameBlameContextBaseInstance.prototype = { |
| + __proto__: BlameContextInstance.prototype, |
| + |
| + get blameContextType() { |
| + return 'Frame'; |
| + } |
| + }; |
| + |
| + return { |
| + FrameBlameContextBaseSnapshot: FrameBlameContextBaseSnapshot, |
| + FrameBlameContextBaseInstance: FrameBlameContextBaseInstance |
| + }; |
| +}); |
| +</script> |