Commit 8088b622 authored by Alexei Filippov's avatar Alexei Filippov Committed by Commit Bot

DevTools: Add 'Load profile' toolbar button to the performance panel

Drive-by: Fix Save profile button alignment
Change-Id: I2ebafe68d006ec070285b1e6b2cda593e4101486
Reviewed-on: https://chromium-review.googlesource.com/579797Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488469}
parent c978c765
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
height="216" height="216"
id="svg2" id="svg2"
version="1.1" version="1.1"
inkscape:version="0.48.0 r9654" inkscape:version="0.48.4 r9939"
sodipodi:docname="largeIcons.svg"> sodipodi:docname="largeIcons.svg">
<metadata <metadata
id="metadata606"> id="metadata606">
...@@ -36,17 +36,20 @@ ...@@ -36,17 +36,20 @@
guidetolerance="10" guidetolerance="10"
inkscape:pageopacity="0" inkscape:pageopacity="0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:window-width="1407" inkscape:window-width="1946"
inkscape:window-height="1195" inkscape:window-height="1546"
id="namedview602" id="namedview602"
showgrid="true" showgrid="true"
inkscape:zoom="17.481482" inkscape:zoom="17.481482"
inkscape:cx="183.14435" inkscape:cx="192.21515"
inkscape:cy="135.46745" inkscape:cy="108.993"
inkscape:window-x="0" inkscape:window-x="0"
inkscape:window-y="0" inkscape:window-y="0"
inkscape:window-maximized="0" inkscape:window-maximized="0"
inkscape:current-layer="svg2"> inkscape:current-layer="svg2"
inkscape:snap-grids="true"
showguides="true"
inkscape:guide-bbox="true">
<inkscape:grid <inkscape:grid
type="xygrid" type="xygrid"
id="grid3583" id="grid3583"
...@@ -422,26 +425,19 @@ ...@@ -422,26 +425,19 @@
id="path190" id="path190"
inkscape:connector-curvature="0" /> inkscape:connector-curvature="0" />
</g> </g>
<g <path
transform="translate(112,24)" style="fill:none;stroke:#000000"
id="g192"> inkscape:connector-curvature="0"
<path id="path196"
transform="translate(-192,-72)" d="m 120.5,30.5 h 14 v 12 h -14 z" />
d="m 200.5,78.5 h 14 v 12 h -14 z" <path
id="path196" inkscape:connector-curvature="0"
inkscape:connector-curvature="0" id="path198"
style="fill:none;stroke:#000000" /> d="m 127,36.5 5,-3.25 v 6.5" />
<path <path
transform="translate(-192,-72)" inkscape:connector-curvature="0"
d="m 207,84.5 5,-3.25 v 6.5" id="path200"
id="path198" d="m 124,30 h 1 v 13 h -1 z" />
inkscape:connector-curvature="0" />
<path
transform="translate(-192,-72)"
d="m 204,78 h 1 v 13 h -1 z"
id="path200"
inkscape:connector-curvature="0" />
</g>
<g <g
transform="translate(112,48)" transform="translate(112,48)"
id="g202"> id="g202">
...@@ -1421,19 +1417,21 @@ ...@@ -1421,19 +1417,21 @@
style="fill:#000000" /> style="fill:#000000" />
</g> </g>
</g> </g>
<g <path
style="fill:#000000" style="fill:#000000"
id="g4305" sodipodi:nodetypes="ccccccccccccc"
transform="translate(196,72)"> inkscape:connector-curvature="0"
<path d="m 215,82 -3,0 0,-4 -4,0 0,4 -3,0 5,6 z m -10,7 0,1 10,0 0,-1 z"
id="path4295" id="path4295" />
d="m 17,10 -3,0 0,-4 -4,0 0,4 -3,0 5,6 z m -10,7 0,1 10,0 0,-1 z" <path
inkscape:connector-curvature="0" style="fill:none"
sodipodi:nodetypes="ccccccccccccc" /> inkscape:connector-curvature="0"
<path d="m 196,72 h 24 v 24 h -24 z"
id="path4297" id="path4297" />
d="M 0,0 H 24 V 24 H 0 z" <path
inkscape:connector-curvature="0" style="fill:#000000"
style="fill:none" /> d="m 210,102 -5,6 3,0 0,4 4,0 0,-4 3,0 z m -5,11 0,1 10,0 0,-1 z"
</g> id="path4295-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccc" />
</svg> </svg>
{ {
"securityIcons.svg": "27676f7c1f1542659c7c49a8052259dc", "securityIcons.svg": "27676f7c1f1542659c7c49a8052259dc",
"largeIcons.svg": "486eeb024854b5dc7ae0a13e3d8e04bd", "largeIcons.svg": "c840722a3ee7c56c545c7b78c549e9ef",
"breakpointConditional.svg": "4cf90210b2af2ed84db2f60b07bcde28", "breakpointConditional.svg": "4cf90210b2af2ed84db2f60b07bcde28",
"checkboxCheckmark.svg": "f039bf85cee42ad5c30ca3bfdce7912a", "checkboxCheckmark.svg": "f039bf85cee42ad5c30ca3bfdce7912a",
"errorWave.svg": "e183fa242a22ed4784a92f6becbc2c45", "errorWave.svg": "e183fa242a22ed4784a92f6becbc2c45",
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
"breakpoint.svg": "69cd92d807259c022791112809b97799", "breakpoint.svg": "69cd92d807259c022791112809b97799",
"treeoutlineTriangles.svg": "017d2f89437df0afc6b9cd5ff43735d9", "treeoutlineTriangles.svg": "017d2f89437df0afc6b9cd5ff43735d9",
"chevrons.svg": "79b4b527771e30b6388ce664077b3409" "chevrons.svg": "79b4b527771e30b6388ce664077b3409"
} }
\ No newline at end of file
{ {
"securityIcons.svg": "27676f7c1f1542659c7c49a8052259dc", "securityIcons.svg": "27676f7c1f1542659c7c49a8052259dc",
"largeIcons.svg": "23525deeadff5f16ca9e8af2a1176fd0", "largeIcons.svg": "c840722a3ee7c56c545c7b78c549e9ef",
"breakpointConditional.svg": "4cf90210b2af2ed84db2f60b07bcde28", "breakpointConditional.svg": "4cf90210b2af2ed84db2f60b07bcde28",
"checkboxCheckmark.svg": "f039bf85cee42ad5c30ca3bfdce7912a", "checkboxCheckmark.svg": "f039bf85cee42ad5c30ca3bfdce7912a",
"errorWave.svg": "e183fa242a22ed4784a92f6becbc2c45", "errorWave.svg": "e183fa242a22ed4784a92f6becbc2c45",
......
...@@ -225,10 +225,13 @@ Timeline.TimelinePanel = class extends UI.Panel { ...@@ -225,10 +225,13 @@ Timeline.TimelinePanel = class extends UI.Panel {
this._clearButton.addEventListener(UI.ToolbarButton.Events.Click, () => this._onClearButton()); this._clearButton.addEventListener(UI.ToolbarButton.Events.Click, () => this._onClearButton());
this._panelToolbar.appendToolbarItem(this._clearButton); this._panelToolbar.appendToolbarItem(this._clearButton);
// Save // Load / Save
this._loadButton = new UI.ToolbarButton(Common.UIString('Load profile...'), 'largeicon-load');
this._loadButton.addEventListener(UI.ToolbarButton.Events.Click, () => this._selectFileToLoad());
this._saveButton = new UI.ToolbarButton(Common.UIString('Save profile...'), 'largeicon-download'); this._saveButton = new UI.ToolbarButton(Common.UIString('Save profile...'), 'largeicon-download');
this._saveButton.addEventListener(UI.ToolbarButton.Events.Click, () => this._saveToFile()); this._saveButton.addEventListener(UI.ToolbarButton.Events.Click, () => this._saveToFile());
this._panelToolbar.appendSeparator(); this._panelToolbar.appendSeparator();
this._panelToolbar.appendToolbarItem(this._loadButton);
this._panelToolbar.appendToolbarItem(this._saveButton); this._panelToolbar.appendToolbarItem(this._saveButton);
// History // History
...@@ -592,6 +595,7 @@ Timeline.TimelinePanel = class extends UI.Panel { ...@@ -592,6 +595,7 @@ Timeline.TimelinePanel = class extends UI.Panel {
this._clearButton.setEnabled(this._state === state.Idle); this._clearButton.setEnabled(this._state === state.Idle);
this._panelToolbar.setEnabled(this._state !== state.Loading); this._panelToolbar.setEnabled(this._state !== state.Loading);
this._dropTarget.setEnabled(this._state === state.Idle); this._dropTarget.setEnabled(this._state === state.Idle);
this._loadButton.setEnabled(this._state === state.Idle);
this._saveButton.setEnabled(this._state === state.Idle && !!this._performanceModel); this._saveButton.setEnabled(this._state === state.Idle && !!this._performanceModel);
} }
......
...@@ -185,6 +185,7 @@ UI.Icon.Descriptors = { ...@@ -185,6 +185,7 @@ UI.Icon.Descriptors = {
'largeicon-hide-top-sidebar': {position: 'e6', spritesheet: 'largeicons', isMask: true}, 'largeicon-hide-top-sidebar': {position: 'e6', spritesheet: 'largeicons', isMask: true},
'largeicon-large-list': {position: 'e5', spritesheet: 'largeicons', isMask: true}, 'largeicon-large-list': {position: 'e5', spritesheet: 'largeicons', isMask: true},
'largeicon-layout-editor': {position: 'a4', spritesheet: 'largeicons', isMask: true}, 'largeicon-layout-editor': {position: 'a4', spritesheet: 'largeicons', isMask: true},
'largeicon-load': {position: 'h5', spritesheet: 'largeicons', isMask: true},
'largeicon-longclick-triangle': {position: 'b4', spritesheet: 'largeicons', isMask: true}, 'largeicon-longclick-triangle': {position: 'b4', spritesheet: 'largeicons', isMask: true},
'largeicon-menu': {position: 'c4', spritesheet: 'largeicons', isMask: true}, 'largeicon-menu': {position: 'c4', spritesheet: 'largeicons', isMask: true},
'largeicon-navigator-domain': {position: 'd4', spritesheet: 'largeicons', isMask: true}, 'largeicon-navigator-domain': {position: 'd4', spritesheet: 'largeicons', isMask: true},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment