<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166041] trunk/Source/WebInspectorUI</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166041">166041</a></dd>
<dt>Author</dt> <dd>bburg@apple.com</dd>
<dt>Date</dt> <dd>2014-03-20 22:26:21 -0700 (Thu, 20 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: add temporary buttons to capture/play/pause replay recordings
https://bugs.webkit.org/show_bug.cgi?id=129692

Reviewed by Timothy Hatcher.

If the Replay agent is available, replace the existing ad-hoc navigation bar
in the Timelines sidebar panel with a record and pause/play button. This UI
is temporary.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/ReplayManager.js: Turn two segment state assertions into
FIXMEs because the assertions are too strong until the public API uses async chains.
(WebInspector.ReplayManager.prototype.replayToMarkIndex):
(WebInspector.ReplayManager.prototype.replayToCompletion):
* UserInterface/Images/Circle.svg: Added.
* UserInterface/Views/ActivateButtonNavigationItem.js:
(WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
* UserInterface/Views/ButtonNavigationItem.css: Adjust styles so the default style
has opacity:1 and the glyph color is darker.
(.navigation-bar .item.button.suppress-emboss &gt; .glyph):
(.navigation-bar .item.button.suppress-emboss.disabled &gt; .glyph):
* UserInterface/Views/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.generateStyleText): Explicitly
generate the width and height properties so that separate button instances do
not influence the size of each other.

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphClicked):
(WebInspector.TimelineSidebarPanel.prototype._replayCaptureButtonClicked):
(WebInspector.TimelineSidebarPanel.prototype._replayPauseResumeButtonClicked):
(WebInspector.TimelineSidebarPanel.prototype._captureStarted):
(WebInspector.TimelineSidebarPanel.prototype._captureStopped):
(WebInspector.TimelineSidebarPanel.prototype._playbackStarted):
(WebInspector.TimelineSidebarPanel.prototype._playbackPaused):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersReplayManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsActivateButtonNavigationItemjs">trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonNavigationItem.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsButtonNavigationItemcss">trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsButtonNavigationItemjs">trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesCirclesvg">trunk/Source/WebInspectorUI/UserInterface/Images/Circle.svg</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (166040 => 166041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-03-21 04:45:14 UTC (rev 166040)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-03-21 05:26:21 UTC (rev 166041)
</span><span class="lines">@@ -1,5 +1,42 @@
</span><span class="cx"> 2014-03-20  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: add temporary buttons to capture/play/pause replay recordings
+        https://bugs.webkit.org/show_bug.cgi?id=129692
+
+        Reviewed by Timothy Hatcher.
+
+        If the Replay agent is available, replace the existing ad-hoc navigation bar
+        in the Timelines sidebar panel with a record and pause/play button. This UI
+        is temporary.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Controllers/ReplayManager.js: Turn two segment state assertions into
+        FIXMEs because the assertions are too strong until the public API uses async chains.
+        (WebInspector.ReplayManager.prototype.replayToMarkIndex):
+        (WebInspector.ReplayManager.prototype.replayToCompletion):
+        * UserInterface/Images/Circle.svg: Added.
+        * UserInterface/Views/ActivateButtonNavigationItem.js:
+        (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
+        * UserInterface/Views/ButtonNavigationItem.css: Adjust styles so the default style
+        has opacity:1 and the glyph color is darker.
+        (.navigation-bar .item.button.suppress-emboss &gt; .glyph):
+        (.navigation-bar .item.button.suppress-emboss.disabled &gt; .glyph):
+        * UserInterface/Views/ButtonNavigationItem.js:
+        (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Explicitly
+        generate the width and height properties so that separate button instances do
+        not influence the size of each other.
+
+        * UserInterface/Views/TimelineSidebarPanel.js:
+        (WebInspector.TimelineSidebarPanel.prototype._recordGlyphClicked):
+        (WebInspector.TimelineSidebarPanel.prototype._replayCaptureButtonClicked):
+        (WebInspector.TimelineSidebarPanel.prototype._replayPauseResumeButtonClicked):
+        (WebInspector.TimelineSidebarPanel.prototype._captureStarted):
+        (WebInspector.TimelineSidebarPanel.prototype._captureStopped):
+        (WebInspector.TimelineSidebarPanel.prototype._playbackStarted):
+        (WebInspector.TimelineSidebarPanel.prototype._playbackPaused):
+
+2014-03-20  Brian Burg  &lt;bburg@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: add frontend controller and models for replay sessions
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=130145
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (166040 => 166041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-03-21 04:45:14 UTC (rev 166040)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-03-21 05:26:21 UTC (rev 166041)
</span><span class="lines">@@ -64,6 +64,7 @@
</span><span class="cx"> localizedStrings[&quot;Average&quot;] = &quot;Average&quot;;
</span><span class="cx"> localizedStrings[&quot;Average Time&quot;] = &quot;Average Time&quot;;
</span><span class="cx"> localizedStrings[&quot;Back (%s)&quot;] = &quot;Back (%s)&quot;;
</span><ins>+localizedStrings[&quot;Begin Capturing&quot;] = &quot;Begin Capturing&quot;;
</ins><span class="cx"> localizedStrings[&quot;Boundary&quot;] = &quot;Boundary&quot;;
</span><span class="cx"> localizedStrings[&quot;Box Model&quot;] = &quot;Box Model&quot;;
</span><span class="cx"> localizedStrings[&quot;Breakpoints&quot;] = &quot;Breakpoints&quot;;
</span><span class="lines">@@ -171,6 +172,7 @@
</span><span class="cx"> localizedStrings[&quot;Enable point to inspect mode (%s)&quot;] = &quot;Enable point to inspect mode (%s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Encoded&quot;] = &quot;Encoded&quot;;
</span><span class="cx"> localizedStrings[&quot;Encoding&quot;] = &quot;Encoding&quot;;
</span><ins>+localizedStrings[&quot;End Capturing&quot;] = &quot;End Capturing&quot;;
</ins><span class="cx"> localizedStrings[&quot;Error: &quot;] = &quot;Error: &quot;;
</span><span class="cx"> localizedStrings[&quot;Errors&quot;] = &quot;Errors&quot;;
</span><span class="cx"> localizedStrings[&quot;Evaluate JavaScript&quot;] = &quot;Evaluate JavaScript&quot;;
</span><span class="lines">@@ -302,6 +304,7 @@
</span><span class="cx"> localizedStrings[&quot;Paints&quot;] = &quot;Paints&quot;;
</span><span class="cx"> localizedStrings[&quot;Parent&quot;] = &quot;Parent&quot;;
</span><span class="cx"> localizedStrings[&quot;Path&quot;] = &quot;Path&quot;;
</span><ins>+localizedStrings[&quot;Pause Playback&quot;] = &quot;Pause Playback&quot;;
</ins><span class="cx"> localizedStrings[&quot;Pause script execution (%s or %s)&quot;] = &quot;Pause script execution (%s or %s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Play Sound&quot;] = &quot;Play Sound&quot;;
</span><span class="cx"> localizedStrings[&quot;Port&quot;] = &quot;Port&quot;;
</span><span class="lines">@@ -385,6 +388,7 @@
</span><span class="cx"> localizedStrings[&quot;Spelling&quot;] = &quot;Spelling&quot;;
</span><span class="cx"> localizedStrings[&quot;Start JavaScript profiling.&quot;] = &quot;Start JavaScript profiling.&quot;;
</span><span class="cx"> localizedStrings[&quot;Start Recording&quot;] = &quot;Start Recording&quot;;
</span><ins>+localizedStrings[&quot;Start Playback&quot;] = &quot;Start Playback&quot;;
</ins><span class="cx"> localizedStrings[&quot;Start Time&quot;] = &quot;Start Time&quot;;
</span><span class="cx"> localizedStrings[&quot;Status&quot;] = &quot;Status&quot;;
</span><span class="cx"> localizedStrings[&quot;Step into (%s or %s)&quot;] = &quot;Step into (%s or %s)&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersReplayManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js (166040 => 166041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js        2014-03-21 04:45:14 UTC (rev 166040)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js        2014-03-21 05:26:21 UTC (rev 166041)
</span><span class="lines">@@ -361,7 +361,7 @@
</span><span class="cx">         console.assert(replayPosition instanceof WebInspector.ReplayPosition);
</span><span class="cx"> 
</span><span class="cx">         console.assert(this.sessionState !== WebInspector.ReplayManager.SessionState.Capturing);
</span><del>-        console.assert(this.segmentState === WebInspector.ReplayManager.SegmentState.Loaded);
</del><ins>+        // FIXME: Once the public API is asynchronous, we should assert that segmentState is Loaded.
</ins><span class="cx"> 
</span><span class="cx">         this.dispatchEventToListeners(WebInspector.ReplayManager.Event.PlaybackWillStart);
</span><span class="cx">         ReplayAgent.replayToPosition(replayPosition, this.playbackSpeed === WebInspector.ReplayManager.PlaybackSpeed.FastForward);
</span><span class="lines">@@ -370,7 +370,7 @@
</span><span class="cx">     replayToCompletion: function()
</span><span class="cx">     {
</span><span class="cx">         console.assert(this.sessionState !== WebInspector.ReplayManager.SessionState.Capturing);
</span><del>-        console.assert(this.segmentState === WebInspector.ReplayManager.SegmentState.Loaded);
</del><ins>+        // FIXME: Once the public API is asynchronous, we should assert that segmentState is Loaded.
</ins><span class="cx"> 
</span><span class="cx">         this.dispatchEventToListeners(WebInspector.ReplayManager.Event.PlaybackWillStart);
</span><span class="cx">         ReplayAgent.replayToCompletion(this.playbackSpeed === WebInspector.ReplayManager.PlaybackSpeed.FastForward);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesCirclesvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/Circle.svg (0 => 166041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Circle.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Circle.svg        2014-03-21 05:26:21 UTC (rev 166041)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!-- Copyright © 2014 Apple Inc. All rights reserved. --&gt;
+&lt;svg version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 13 13&quot;&gt;
+    &lt;circle cx=&quot;6.5&quot; cy=&quot;6.5&quot; r=&quot;4&quot;/&gt;
+&lt;/svg&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsActivateButtonNavigationItemjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonNavigationItem.js (166040 => 166041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonNavigationItem.js        2014-03-21 04:45:14 UTC (rev 166040)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonNavigationItem.js        2014-03-21 05:26:21 UTC (rev 166041)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">         var classNames = this._classNames.join(&quot;.&quot;);
</span><span class="cx"> 
</span><span class="cx">         if (this._suppressEmboss)
</span><del>-            var styleText = parentSelector + &quot; .&quot; + classNames + &quot; &gt; .glyph { background-size: &quot; +  this._imageWidth + &quot;px &quot; + this._imageHeight + &quot;px; }\n&quot;;
</del><ins>+            var styleText = parentSelector + &quot; .&quot; + classNames + &quot; &gt; .glyph { width: &quot; +  this._imageWidth + &quot;px; height: &quot; + this._imageHeight + &quot;px; }\n&quot;;
</ins><span class="cx">         else {
</span><span class="cx">             var activatedClassName = &quot;.&quot; + WebInspector.ActivateButtonNavigationItem.ActivatedStyleClassName;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsButtonNavigationItemcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.css (166040 => 166041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.css        2014-03-21 04:45:14 UTC (rev 166040)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.css        2014-03-21 05:26:21 UTC (rev 166041)
</span><span class="lines">@@ -60,8 +60,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .navigation-bar .item.button.suppress-emboss &gt; .glyph {
</span><del>-    background-color: rgb(153, 153, 153);
-    opacity: 0.7;
</del><ins>+    background-color: rgb(95, 95, 95);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .navigation-bar .item.button.suppress-emboss:active &gt; .glyph {
</span><span class="lines">@@ -69,5 +68,5 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .navigation-bar .item.button.suppress-emboss.disabled &gt; .glyph {
</span><del>-    opacity: 0.3 !important;
</del><ins>+    opacity: 0.7 !important;
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsButtonNavigationItemjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.js (166040 => 166041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.js        2014-03-21 04:45:14 UTC (rev 166040)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.js        2014-03-21 05:26:21 UTC (rev 166041)
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx">         var classNames = this._classNames.join(&quot;.&quot;);
</span><span class="cx"> 
</span><span class="cx">         if (this._suppressEmboss)
</span><del>-            var styleText = parentSelector + &quot; .&quot; + classNames + &quot; &gt; .glyph { background-size: &quot; +  this._imageWidth + &quot;px &quot; + this._imageHeight + &quot;px; }\n&quot;;
</del><ins>+            var styleText = parentSelector + &quot; .&quot; + classNames + &quot; &gt; .glyph { width: &quot; +  this._imageWidth + &quot;px; height: &quot; + this._imageHeight + &quot;px; }\n&quot;;
</ins><span class="cx">         else {
</span><span class="cx">             // Default state.
</span><span class="cx">             var styleText = parentSelector + &quot; .&quot; + classNames + &quot; &gt; .glyph { background-image: -webkit-canvas(&quot; + this._canvasIdentifier() + &quot;); background-size: &quot; +  this._imageWidth + &quot;px &quot; + this._imageHeight + &quot;px; }\n&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (166040 => 166041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js        2014-03-21 04:45:14 UTC (rev 166040)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js        2014-03-21 05:26:21 UTC (rev 166041)
</span><span class="lines">@@ -64,6 +64,31 @@
</span><span class="cx">     this._recordStatusElement.className = WebInspector.TimelineSidebarPanel.RecordStatusStyleClass;
</span><span class="cx">     statusBarElement.appendChild(this._recordStatusElement);
</span><span class="cx"> 
</span><ins>+    if (window.ReplayAgent) {
+        // If replay support is enabled, hide the default status bar element and show a navigation bar instead.
+        statusBarElement.classList.add(WebInspector.TimelineSidebarPanel.HiddenStyleClassName);
+
+        this._navigationBar = new WebInspector.NavigationBar;
+        this.element.appendChild(this._navigationBar.element);
+
+        var toolTip = WebInspector.UIString(&quot;Begin Capturing&quot;);
+        var altToolTip = WebInspector.UIString(&quot;End Capturing&quot;);
+        this._replayCaptureButtonItem = new WebInspector.ActivateButtonNavigationItem(&quot;replay-capture&quot;, toolTip, altToolTip, &quot;Images/Circle.svg&quot;, 16, 16);
+        this._replayCaptureButtonItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._replayCaptureButtonClicked, this);
+        this._replayCaptureButtonItem.enabled = true;
+        this._navigationBar.addNavigationItem(this._replayCaptureButtonItem);
+
+        toolTip = WebInspector.UIString(&quot;Start Playback&quot;);
+        altToolTip = WebInspector.UIString(&quot;Pause Playback&quot;);
+        this._replayPauseResumeButtonItem = new WebInspector.ToggleButtonNavigationItem(&quot;replay-pause-resume&quot;, toolTip, altToolTip, &quot;Images/Resume.svg&quot;, &quot;Images/Pause.svg&quot;, 16, 16, true);
+        this._replayPauseResumeButtonItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._replayPauseResumeButtonClicked, this);
+        this._replayPauseResumeButtonItem.enabled = false;
+        this._navigationBar.addNavigationItem(this._replayPauseResumeButtonItem);
+
+        WebInspector.replayManager.addEventListener(WebInspector.ReplayManager.Event.CaptureStarted, this._captureStarted, this);
+        WebInspector.replayManager.addEventListener(WebInspector.ReplayManager.Event.CaptureStopped, this._captureStopped, this);
+    }
+
</ins><span class="cx">     function createTimelineTreeElement(label, iconClass, identifier)
</span><span class="cx">     {
</span><span class="cx">         var treeElement = new WebInspector.GeneralTreeElement([iconClass, WebInspector.TimelineSidebarPanel.LargeIconStyleClass], label, null, identifier);
</span><span class="lines">@@ -94,6 +119,7 @@
</span><span class="cx">     WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.RecordingStopped, this._recordingStopped, this);
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector.TimelineSidebarPanel.HiddenStyleClassName = &quot;hidden&quot;;
</ins><span class="cx"> WebInspector.TimelineSidebarPanel.StatusBarStyleClass = &quot;status-bar&quot;;
</span><span class="cx"> WebInspector.TimelineSidebarPanel.RecordGlyphStyleClass = &quot;record-glyph&quot;;
</span><span class="cx"> WebInspector.TimelineSidebarPanel.RecordGlyphRecordingStyleClass = &quot;recording&quot;;
</span><span class="lines">@@ -347,5 +373,53 @@
</span><span class="cx">             WebInspector.timelineManager.stopRecording();
</span><span class="cx">         else
</span><span class="cx">             WebInspector.timelineManager.startRecording();
</span><ins>+    },
+
+    // These methods are only used when ReplayAgent is available.
+
+    _replayCaptureButtonClicked: function()
+    {
+        if (!this._replayCaptureButtonItem.activated) {
+            WebInspector.replayManager.startCapturing();
+            WebInspector.timelineManager.startRecording();
+
+            // De-bounce further presses until the backend has begun capturing.
+            this._replayCaptureButtonItem.activated = true;
+            this._replayCaptureButtonItem.enabled = false;
+        } else {
+            WebInspector.replayManager.stopCapturing();
+            WebInspector.timelineManager.stopRecording();
+
+            this._replayCaptureButtonItem.enabled = false;
+        }
+    },
+
+    _replayPauseResumeButtonClicked: function()
+    {
+        if (this._replayPauseResumeButtonItem.toggled)
+            WebInspector.replayManager.pausePlayback();
+        else
+            WebInspector.replayManager.replayToCompletion();
+    },
+
+    _captureStarted: function()
+    {
+        this._replayCaptureButtonItem.enabled = true;
+    },
+
+    _captureStopped: function()
+    {
+        this._replayCaptureButtonItem.activated = false;
+        this._replayPauseResumeButtonItem.enabled = true;
+    },
+
+    _playbackStarted: function()
+    {
+        this._replayPauseResumeButtonItem.toggled = true;
+    },
+
+    _playbackPaused: function()
+    {
+        this._replayPauseResumeButtonItem.toggled = false;
</ins><span class="cx">     }
</span><span class="cx"> };
</span></span></pre>
</div>
</div>

</body>
</html>