Move Webstore URL concepts to //extensions and out
[chromium-blink-merge.git] / chrome / browser / resources / print_preview / print_preview_focus_manager.js
blobfd2408753336c24653555dd3fba21ab88943b87a
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
3 // found in the LICENSE file.
5 cr.define('print_preview', function() {
6 'use strict';
8 /**
9 * FocusManager implementation specialized for Print Preview, which ensures
10 * that Print Preview itself does not receive focus when an overlay is shown.
11 * @constructor
13 function PrintPreviewFocusManager() {
16 cr.addSingletonGetter(PrintPreviewFocusManager);
18 PrintPreviewFocusManager.prototype = {
19 __proto__: cr.ui.FocusManager.prototype,
21 /** @override */
22 getFocusParent: function() {
23 return document.querySelector('.overlay:not([hidden])') ||
24 document.body;
28 // Export
29 return {
30 PrintPreviewFocusManager: PrintPreviewFocusManager
32 });