Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: Source/devtools/front_end/main/Main.js

Issue 1163293003: [DevTools] Remove WI.OverridesSupport.responsiveDesignAvailable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplified Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/main/AdvancedApp.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 this._addMainEventListeners(document); 186 this._addMainEventListeners(document);
187 187
188 var canDock = !!Runtime.queryParam("can_dock"); 188 var canDock = !!Runtime.queryParam("can_dock");
189 WebInspector.zoomManager = new WebInspector.ZoomManager(window, Inspecto rFrontendHost); 189 WebInspector.zoomManager = new WebInspector.ZoomManager(window, Inspecto rFrontendHost);
190 WebInspector.inspectorView = new WebInspector.InspectorView(); 190 WebInspector.inspectorView = new WebInspector.InspectorView();
191 WebInspector.ContextMenu.initialize(); 191 WebInspector.ContextMenu.initialize();
192 WebInspector.ContextMenu.installHandler(document); 192 WebInspector.ContextMenu.installHandler(document);
193 WebInspector.dockController = new WebInspector.DockController(canDock); 193 WebInspector.dockController = new WebInspector.DockController(canDock);
194 WebInspector.overridesSupport = new WebInspector.OverridesSupport(canDoc k); 194 WebInspector.overridesSupport = new WebInspector.OverridesSupport();
195 WebInspector.emulatedDevicesList = new WebInspector.EmulatedDevicesList( ); 195 WebInspector.emulatedDevicesList = new WebInspector.EmulatedDevicesList( );
196 WebInspector.multitargetConsoleModel = new WebInspector.MultitargetConso leModel(); 196 WebInspector.multitargetConsoleModel = new WebInspector.MultitargetConso leModel();
197 WebInspector.multitargetNetworkManager = new WebInspector.MultitargetNet workManager(); 197 WebInspector.multitargetNetworkManager = new WebInspector.MultitargetNet workManager();
198 198
199 WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen(); 199 WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen();
200 // set order of some sections explicitly 200 // set order of some sections explicitly
201 WebInspector.shortcutsScreen.section(WebInspector.UIString("Console")); 201 WebInspector.shortcutsScreen.section(WebInspector.UIString("Console"));
202 WebInspector.shortcutsScreen.section(WebInspector.UIString("Elements Pan el")); 202 WebInspector.shortcutsScreen.section(WebInspector.UIString("Elements Pan el"));
203 203
204 WebInspector.fileManager = new WebInspector.FileManager(); 204 WebInspector.fileManager = new WebInspector.FileManager();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 this._mainTarget.registerInspectorDispatcher(this); 329 this._mainTarget.registerInspectorDispatcher(this);
330 330
331 if (this._mainTarget.isServiceWorker()) 331 if (this._mainTarget.isServiceWorker())
332 this._mainTarget.runtimeAgent().run(); 332 this._mainTarget.runtimeAgent().run();
333 333
334 WebInspector.overridesSupport.init(this._mainTarget, overridesReady); 334 WebInspector.overridesSupport.init(this._mainTarget, overridesReady);
335 335
336 function overridesReady() 336 function overridesReady()
337 { 337 {
338 if (!WebInspector.overridesSupport.responsiveDesignAvailable() && We bInspector.overridesSupport.emulationEnabled()) 338 if (!WebInspector.dockController.canDock() && WebInspector.overrides Support.emulationEnabled())
339 WebInspector.inspectorView.showViewInDrawer("emulation", true); 339 WebInspector.inspectorView.showViewInDrawer("emulation", true);
340 340
341 target.inspectorAgent().enable(inspectorAgentEnableCallback); 341 target.inspectorAgent().enable(inspectorAgentEnableCallback);
342 } 342 }
343 343
344 function inspectorAgentEnableCallback() 344 function inspectorAgentEnableCallback()
345 { 345 {
346 console.timeStamp("Main.inspectorAgentEnableCallback"); 346 console.timeStamp("Main.inspectorAgentEnableCallback");
347 WebInspector.notifications.dispatchEventToListeners(WebInspector.Not ificationService.Events.InspectorAgentEnabledForTests); 347 WebInspector.notifications.dispatchEventToListeners(WebInspector.Not ificationService.Events.InspectorAgentEnabledForTests);
348 // Asynchronously run the extensions. 348 // Asynchronously run the extensions.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 448
449 keys = [ 449 keys = [
450 shortcut.makeDescriptor("[", shortcut.Modifiers.CtrlOrMeta | shortcu t.Modifiers.Alt), 450 shortcut.makeDescriptor("[", shortcut.Modifiers.CtrlOrMeta | shortcu t.Modifiers.Alt),
451 shortcut.makeDescriptor("]", shortcut.Modifiers.CtrlOrMeta | shortcu t.Modifiers.Alt) 451 shortcut.makeDescriptor("]", shortcut.Modifiers.CtrlOrMeta | shortcu t.Modifiers.Alt)
452 ]; 452 ];
453 section.addRelatedKeys(keys, WebInspector.UIString("Go back/forward in p anel history")); 453 section.addRelatedKeys(keys, WebInspector.UIString("Go back/forward in p anel history"));
454 454
455 var toggleConsoleLabel = WebInspector.UIString("Show console"); 455 var toggleConsoleLabel = WebInspector.UIString("Show console");
456 section.addKey(shortcut.makeDescriptor(shortcut.Keys.Tilde, shortcut.Mod ifiers.Ctrl), toggleConsoleLabel); 456 section.addKey(shortcut.makeDescriptor(shortcut.Keys.Tilde, shortcut.Mod ifiers.Ctrl), toggleConsoleLabel);
457 section.addKey(shortcut.makeDescriptor(shortcut.Keys.Esc), WebInspector. UIString("Toggle drawer")); 457 section.addKey(shortcut.makeDescriptor(shortcut.Keys.Esc), WebInspector. UIString("Toggle drawer"));
458 if (WebInspector.overridesSupport.responsiveDesignAvailable()) 458 if (WebInspector.dockController.canDock()) {
459 section.addKey(shortcut.makeDescriptor("M", shortcut.Modifiers.CtrlO rMeta | shortcut.Modifiers.Shift), WebInspector.UIString("Toggle device mode")); 459 section.addKey(shortcut.makeDescriptor("M", shortcut.Modifiers.CtrlO rMeta | shortcut.Modifiers.Shift), WebInspector.UIString("Toggle device mode"));
460 if (WebInspector.dockController.canDock())
461 section.addKey(shortcut.makeDescriptor("D", shortcut.Modifiers.CtrlO rMeta | shortcut.Modifiers.Shift), WebInspector.UIString("Toggle dock side")); 460 section.addKey(shortcut.makeDescriptor("D", shortcut.Modifiers.CtrlO rMeta | shortcut.Modifiers.Shift), WebInspector.UIString("Toggle dock side"));
461 }
462 section.addKey(shortcut.makeDescriptor("f", shortcut.Modifiers.CtrlOrMet a), WebInspector.UIString("Search")); 462 section.addKey(shortcut.makeDescriptor("f", shortcut.Modifiers.CtrlOrMet a), WebInspector.UIString("Search"));
463 463
464 var advancedSearchShortcutModifier = WebInspector.isMac() 464 var advancedSearchShortcutModifier = WebInspector.isMac()
465 ? WebInspector.KeyboardShortcut.Modifiers.Meta | WebInspector.Ke yboardShortcut.Modifiers.Alt 465 ? WebInspector.KeyboardShortcut.Modifiers.Meta | WebInspector.Ke yboardShortcut.Modifiers.Alt
466 : WebInspector.KeyboardShortcut.Modifiers.Ctrl | WebInspector.Ke yboardShortcut.Modifiers.Shift; 466 : WebInspector.KeyboardShortcut.Modifiers.Ctrl | WebInspector.Ke yboardShortcut.Modifiers.Shift;
467 var advancedSearchShortcut = shortcut.makeDescriptor("f", advancedSearch ShortcutModifier); 467 var advancedSearchShortcut = shortcut.makeDescriptor("f", advancedSearch ShortcutModifier);
468 section.addKey(advancedSearchShortcut, WebInspector.UIString("Search acr oss all sources")); 468 section.addKey(advancedSearchShortcut, WebInspector.UIString("Search acr oss all sources"));
469 469
470 var inspectElementModeShortcut = WebInspector.InspectElementModeControll er.createShortcut(); 470 var inspectElementModeShortcut = WebInspector.InspectElementModeControll er.createShortcut();
471 section.addKey(inspectElementModeShortcut, WebInspector.UIString("Select node to inspect")); 471 section.addKey(inspectElementModeShortcut, WebInspector.UIString("Select node to inspect"));
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 p.classList.add("help-section"); 839 p.classList.add("help-section");
840 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once it restarts we will attach to it automatically."); 840 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once it restarts we will attach to it automatically.");
841 } 841 }
842 842
843 WebInspector.WorkerTerminatedScreen.prototype = { 843 WebInspector.WorkerTerminatedScreen.prototype = {
844 844
845 __proto__: WebInspector.HelpScreen.prototype 845 __proto__: WebInspector.HelpScreen.prototype
846 } 846 }
847 847
848 new WebInspector.Main(); 848 new WebInspector.Main();
OLDNEW
« no previous file with comments | « Source/devtools/front_end/main/AdvancedApp.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698