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

Side by Side Diff: Source/devtools/front_end/AdvancedSearchView.js

Issue 218613013: DevTools: Decouple shortcuts from actions, introduce shortcut contexts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments - take 1 Created 6 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 */ 8 */
9 WebInspector.AdvancedSearchView = function() 9 WebInspector.AdvancedSearchView = function()
10 { 10 {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 /** 355 /**
356 * @constructor 356 * @constructor
357 * @implements {WebInspector.ActionDelegate} 357 * @implements {WebInspector.ActionDelegate}
358 */ 358 */
359 WebInspector.AdvancedSearchView.ToggleDrawerViewActionDelegate = function() 359 WebInspector.AdvancedSearchView.ToggleDrawerViewActionDelegate = function()
360 { 360 {
361 } 361 }
362 362
363 WebInspector.AdvancedSearchView.ToggleDrawerViewActionDelegate.prototype = { 363 WebInspector.AdvancedSearchView.ToggleDrawerViewActionDelegate.prototype = {
364 /** 364 /**
365 * @param {!Event} event 365 * @param {!WebInspector.Context} context
366 * @return {boolean} 366 * @return {boolean}
367 */ 367 */
368 handleAction: function(event) 368 handleAction: function(context)
369 { 369 {
370 if (WebInspector.Dialog.currentInstance()) 370 if (context.flavor(WebInspector.Dialog))
pfeldman 2014/04/17 10:40:25 We should not make everything dialog-aware.
apavlov 2014/04/17 12:42:22 Done.
371 return false; 371 return false;
372 var searchView = this._searchView(); 372 var searchView = this._searchView();
373 if (!searchView) 373 if (!searchView)
374 return false; 374 return false;
375 if (!searchView.isShowing() || searchView._search !== document.activeEle ment) { 375 if (!searchView.isShowing() || searchView._search !== document.activeEle ment) {
376 WebInspector.inspectorView.showPanel("sources"); 376 WebInspector.inspectorView.showPanel("sources");
377 searchView.toggle(); 377 searchView.toggle();
378 } else { 378 } else {
379 WebInspector.inspectorView.closeDrawer(); 379 WebInspector.inspectorView.closeDrawer();
380 } 380 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 /** 437 /**
438 * @param {!WebInspector.ProjectSearchConfig} searchConfig 438 * @param {!WebInspector.ProjectSearchConfig} searchConfig
439 * @return {!WebInspector.SearchResultsPane} 439 * @return {!WebInspector.SearchResultsPane}
440 */ 440 */
441 createSearchResultsPane: function(searchConfig) { } 441 createSearchResultsPane: function(searchConfig) { }
442 } 442 }
443 443
444 importScript("SearchConfig.js"); 444 importScript("SearchConfig.js");
445 importScript("FileBasedSearchResultsPane.js"); 445 importScript("FileBasedSearchResultsPane.js");
446 importScript("SourcesSearchScope.js"); 446 importScript("SourcesSearchScope.js");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698