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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js

Issue 2014073002: [DevTools] Focus DevTools when revealing setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 return success ? Promise.resolve() : Promise.reject(); 551 return success ? Promise.resolve() : Promise.reject();
552 552
553 /** 553 /**
554 * @param {!Runtime.Extension} extension 554 * @param {!Runtime.Extension} extension
555 */ 555 */
556 function revealModuleSetting(extension) 556 function revealModuleSetting(extension)
557 { 557 {
558 if (!WebInspector.GenericSettingsTab.isSettingVisible(extension)) 558 if (!WebInspector.GenericSettingsTab.isSettingVisible(extension))
559 return; 559 return;
560 if (extension.descriptor()["settingName"] === setting.name) { 560 if (extension.descriptor()["settingName"] === setting.name) {
561 InspectorFrontendHost.bringToFront();
561 WebInspector._settingsController.showSettingsScreen("preferences "); 562 WebInspector._settingsController.showSettingsScreen("preferences ");
562 success = true; 563 success = true;
563 } 564 }
564 } 565 }
565 566
566 /** 567 /**
567 * @param {!Runtime.Extension} extension 568 * @param {!Runtime.Extension} extension
568 */ 569 */
569 function revealSettingUI(extension) 570 function revealSettingUI(extension)
570 { 571 {
571 var settings = extension.descriptor()["settings"]; 572 var settings = extension.descriptor()["settings"];
572 if (settings && settings.indexOf(setting.name) !== -1) { 573 if (settings && settings.indexOf(setting.name) !== -1) {
574 InspectorFrontendHost.bringToFront();
573 WebInspector._settingsController.showSettingsScreen("preferences "); 575 WebInspector._settingsController.showSettingsScreen("preferences ");
574 success = true; 576 success = true;
575 } 577 }
576 } 578 }
577 579
578 /** 580 /**
579 * @param {!Runtime.Extension} extension 581 * @param {!Runtime.Extension} extension
580 */ 582 */
581 function revealSettingsView(extension) 583 function revealSettingsView(extension)
582 { 584 {
583 var settings = extension.descriptor()["settings"]; 585 var settings = extension.descriptor()["settings"];
584 if (settings && settings.indexOf(setting.name) !== -1) { 586 if (settings && settings.indexOf(setting.name) !== -1) {
587 InspectorFrontendHost.bringToFront();
lushnikov 2016/05/26 00:11:46 why not inline this in showSettingsScreen method?
dgozman 2016/05/26 00:18:10 Not sure. May have unpredictable consequences.
585 WebInspector._settingsController.showSettingsScreen(extension.de scriptor()["name"]); 588 WebInspector._settingsController.showSettingsScreen(extension.de scriptor()["name"]);
586 success = true; 589 success = true;
587 } 590 }
588 } 591 }
589 } 592 }
590 } 593 }
591 594
592 WebInspector._settingsController = new WebInspector.SettingsController(); 595 WebInspector._settingsController = new WebInspector.SettingsController();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698