OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 __proto__: WebInspector.VBox.prototype | 426 __proto__: WebInspector.VBox.prototype |
427 }; | 427 }; |
428 | 428 |
429 /** | 429 /** |
430 * @type {!WebInspector.InspectorView} | 430 * @type {!WebInspector.InspectorView} |
431 */ | 431 */ |
432 WebInspector.inspectorView; | 432 WebInspector.inspectorView; |
433 | 433 |
434 /** | 434 /** |
435 * @constructor | 435 * @constructor |
| 436 * @implements {WebInspector.ActionDelegate} |
| 437 */ |
| 438 WebInspector.InspectorView.DrawerToggleActionDelegate = function() |
| 439 { |
| 440 } |
| 441 |
| 442 WebInspector.InspectorView.DrawerToggleActionDelegate.prototype = { |
| 443 /** |
| 444 * @return {boolean} |
| 445 */ |
| 446 handleAction: function() |
| 447 { |
| 448 if (WebInspector.inspectorView.drawerVisible()) { |
| 449 WebInspector.inspectorView.closeDrawer(); |
| 450 return true; |
| 451 } |
| 452 if (!WebInspector.experimentsSettings.doNotOpenDrawerOnEsc.isEnabled())
{ |
| 453 WebInspector.inspectorView.showDrawer(); |
| 454 return true; |
| 455 } |
| 456 return false; |
| 457 } |
| 458 } |
| 459 |
| 460 /** |
| 461 * @constructor |
436 * @extends {WebInspector.VBox} | 462 * @extends {WebInspector.VBox} |
437 */ | 463 */ |
438 WebInspector.RootView = function() | 464 WebInspector.RootView = function() |
439 { | 465 { |
440 WebInspector.VBox.call(this); | 466 WebInspector.VBox.call(this); |
441 this.markAsRoot(); | 467 this.markAsRoot(); |
442 this.element.classList.add("root-view"); | 468 this.element.classList.add("root-view"); |
443 this.element.setAttribute("spellcheck", false); | 469 this.element.setAttribute("spellcheck", false); |
444 window.addEventListener("resize", this.doResize.bind(this), true); | 470 window.addEventListener("resize", this.doResize.bind(this), true); |
445 this._onScrollBound = this._onScroll.bind(this); | 471 this._onScrollBound = this._onScroll.bind(this); |
(...skipping 27 matching lines...) Expand all Loading... |
473 window.addEventListener("scroll", this._onScrollBound, false); | 499 window.addEventListener("scroll", this._onScrollBound, false); |
474 else | 500 else |
475 window.removeEventListener("scroll", this._onScrollBound, false); | 501 window.removeEventListener("scroll", this._onScrollBound, false); |
476 | 502 |
477 WebInspector.VBox.prototype.doResize.call(this); | 503 WebInspector.VBox.prototype.doResize.call(this); |
478 this._onScroll(); | 504 this._onScroll(); |
479 }, | 505 }, |
480 | 506 |
481 __proto__: WebInspector.VBox.prototype | 507 __proto__: WebInspector.VBox.prototype |
482 }; | 508 }; |
OLD | NEW |