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

Unified Diff: tracing/tracing/extras/chrome/blame_context/frame_blame_context_base.html

Issue 2016213002: Introduce base classes for blame contexts (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Add frame_blame_context_test.html; And some other revision Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698