OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Tools is a main class that wires all components of the | 6 * @fileoverview Tools is a main class that wires all components of the |
7 * DevTools frontend together. It is also responsible for overriding existing | 7 * DevTools frontend together. It is also responsible for overriding existing |
8 * WebInspector functionality while it is getting upstreamed into WebCore. | 8 * WebInspector functionality while it is getting upstreamed into WebCore. |
9 */ | 9 */ |
10 goog.provide('devtools.Tools'); | 10 goog.provide('devtools.Tools'); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
215 /////////////////////////////////////////////////////////////////////////////// | 215 /////////////////////////////////////////////////////////////////////////////// |
216 // Here and below are overrides to existing WebInspector methods only. | 216 // Here and below are overrides to existing WebInspector methods only. |
217 // TODO(pfeldman): Patch WebCore and upstream changes. | 217 // TODO(pfeldman): Patch WebCore and upstream changes. |
218 var oldLoaded = WebInspector.loaded; | 218 var oldLoaded = WebInspector.loaded; |
219 WebInspector.loaded = function() { | 219 WebInspector.loaded = function() { |
220 devtools.tools = new devtools.ToolsAgent(); | 220 devtools.tools = new devtools.ToolsAgent(); |
221 devtools.tools.reset(); | 221 devtools.tools.reset(); |
222 | 222 |
223 Preferences.ignoreWhitespace = false; | 223 Preferences.ignoreWhitespace = false; |
224 oldLoaded.call(this); | 224 oldLoaded.call(this); |
225 | |
226 // Hide dock button on Mac OS. | |
227 // TODO(pfeldman): remove once Mac OS docking is implemented. | |
225 if (InspectorController.platform().indexOf('mac') == 0) { | 228 if (InspectorController.platform().indexOf('mac') == 0) { |
226 document.getElementById('dock-status-bar-item').addStyleClass('hidden'); | 229 document.getElementById('dock-status-bar-item').addStyleClass('hidden'); |
227 } | 230 } |
228 | 231 |
232 // Mute refresh action. | |
233 document.addEventListener("keydown", function(event) { | |
234 if (event.keyIdentifier == 'F5') { | |
235 event.preventDefault(); | |
236 } else if (event.keyIdentifier == 'U+0052' && | |
yurys
2009/07/21 12:01:36
please use a constant for this
| |
237 (event.ctrlKey || event.metaKey)) { | |
238 event.preventDefault(); | |
239 } | |
240 }, true); | |
241 | |
229 DevToolsHost.loaded(); | 242 DevToolsHost.loaded(); |
230 }; | 243 }; |
231 | 244 |
232 | 245 |
233 var webkitUpdateChildren = | 246 var webkitUpdateChildren = |
234 WebInspector.ElementsTreeElement.prototype.updateChildren; | 247 WebInspector.ElementsTreeElement.prototype.updateChildren; |
235 | 248 |
236 | 249 |
237 /** | 250 /** |
238 * @override | 251 * @override |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1050 }; | 1063 }; |
1051 | 1064 |
1052 var originalDragEnd = WebInspector.elementDragEnd; | 1065 var originalDragEnd = WebInspector.elementDragEnd; |
1053 WebInspector.elementDragEnd = function() { | 1066 WebInspector.elementDragEnd = function() { |
1054 originalDragEnd.apply(this, arguments); | 1067 originalDragEnd.apply(this, arguments); |
1055 | 1068 |
1056 var glassPane = document.getElementById('glass-pane-for-drag'); | 1069 var glassPane = document.getElementById('glass-pane-for-drag'); |
1057 glassPane.parentElement.removeChild(glassPane); | 1070 glassPane.parentElement.removeChild(glassPane); |
1058 }; | 1071 }; |
1059 })(); | 1072 })(); |
OLD | NEW |