1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 cr.define('extensions', function() { 6 var FocusManager = cr.ui.FocusManager; 7 8 function ExtensionFocusManager() { 9 FocusManager.disableMouseFocusOnButtons(); 10 } 11 12 cr.addSingletonGetter(ExtensionFocusManager); 13 14 ExtensionFocusManager.prototype = { 15 __proto__: FocusManager.prototype, 16 17 /** @override */ 18 getFocusParent: function() { 19 var overlay = extensions.ExtensionSettings.getCurrentOverlay(); 20 return overlay || $('extension-settings'); 21 }, 22 }; 23 24 return { 25 ExtensionFocusManager: ExtensionFocusManager, 26 }; 27 }); 28