OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 this._statusBarItemContainer.appendChild(statusBarItems[i]); | 72 this._statusBarItemContainer.appendChild(statusBarItems[i]); |
73 panelStatusBar.insertBefore(this._statusBarItemContainer, drawerView
Anchor); | 73 panelStatusBar.insertBefore(this._statusBarItemContainer, drawerView
Anchor); |
74 } | 74 } |
75 var statusBarText = this.statusBarText(); | 75 var statusBarText = this.statusBarText(); |
76 if (statusBarText) { | 76 if (statusBarText) { |
77 this._statusBarTextElement = statusBarText; | 77 this._statusBarTextElement = statusBarText; |
78 panelStatusBar.appendChild(statusBarText); | 78 panelStatusBar.appendChild(statusBarText); |
79 } | 79 } |
80 | 80 |
81 this.focus(); | 81 this.focus(); |
| 82 var defaultJumpHistoryEntry = this.createPanelJumpHistoryEntry(); |
| 83 if (defaultJumpHistoryEntry) |
| 84 WebInspector.jumpHistoryManager.jumpToPosition(null, defaultJumpHist
oryEntry); |
| 85 }, |
| 86 |
| 87 /** |
| 88 * @return {?WebInspector.JumpHistoryEntry} |
| 89 */ |
| 90 createPanelJumpHistoryEntry: function() |
| 91 { |
| 92 return new WebInspector.PanelJumpHistoryEntry(this); |
82 }, | 93 }, |
83 | 94 |
84 willHide: function() | 95 willHide: function() |
85 { | 96 { |
86 if (this._statusBarItemContainer) | 97 if (this._statusBarItemContainer) |
87 this._statusBarItemContainer.remove(); | 98 this._statusBarItemContainer.remove(); |
88 delete this._statusBarItemContainer; | 99 delete this._statusBarItemContainer; |
89 | 100 |
90 if (this._statusBarTextElement) | 101 if (this._statusBarTextElement) |
91 this._statusBarTextElement.remove(); | 102 this._statusBarTextElement.remove(); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 if (this._panel) | 348 if (this._panel) |
338 return this._panel; | 349 return this._panel; |
339 if (this._scriptName) | 350 if (this._scriptName) |
340 loadScript(this._scriptName); | 351 loadScript(this._scriptName); |
341 this._panel = new WebInspector[this._className]; | 352 this._panel = new WebInspector[this._className]; |
342 return this._panel; | 353 return this._panel; |
343 }, | 354 }, |
344 | 355 |
345 registerShortcuts: function() {} | 356 registerShortcuts: function() {} |
346 } | 357 } |
| 358 |
| 359 /** |
| 360 * @constructor |
| 361 * @implements {WebInspector.JumpHistoryEntry} |
| 362 * @param {WebInspector.Panel} panel |
| 363 */ |
| 364 WebInspector.PanelJumpHistoryEntry = function(panel) |
| 365 { |
| 366 this._panel = panel; |
| 367 } |
| 368 |
| 369 WebInspector.PanelJumpHistoryEntry.prototype = { |
| 370 /** |
| 371 * @return {boolean} |
| 372 */ |
| 373 valid: function() |
| 374 { |
| 375 return true; |
| 376 }, |
| 377 |
| 378 /** |
| 379 * @param {WebInspector.JumpHistoryEntry} entry |
| 380 */ |
| 381 merge: function(entry) |
| 382 { |
| 383 }, |
| 384 |
| 385 /** |
| 386 * @return {boolean} |
| 387 */ |
| 388 reveal: function() |
| 389 { |
| 390 if (this._panel.isShowing()) |
| 391 return false; |
| 392 WebInspector.inspectorView.setCurrentPanel(this._panel); |
| 393 return true; |
| 394 }, |
| 395 |
| 396 /** |
| 397 * @param {WebInspector.JumpHistoryEntry} entry |
| 398 */ |
| 399 equal: function(entry) |
| 400 { |
| 401 if (!(entry instanceof WebInspector.PanelJumpHistoryEntry)) |
| 402 return false; |
| 403 return this._panel === entry._panel; |
| 404 } |
| 405 } |
OLD | NEW |