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

Side by Side Diff: chrome/browser/resources/print_preview/print_preview_focus_manager.js

Issue 575333002: Compile print_preview, part 2: reduce down to 260 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview
Patch Set: revert movement of enums: now handle in compiler pass Created 6 years, 2 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
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 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * FocusManager implementation specialized for Print Preview, which ensures 9 * FocusManager implementation specialized for Print Preview, which ensures
10 * that Print Preview itself does not receive focus when an overlay is shown. 10 * that Print Preview itself does not receive focus when an overlay is shown.
11 * @constructor 11 * @constructor
12 * @extends {cr.ui.FocusManager}
12 */ 13 */
13 function PrintPreviewFocusManager() { 14 function PrintPreviewFocusManager() {
14 }; 15 };
15 16
16 cr.addSingletonGetter(PrintPreviewFocusManager); 17 cr.addSingletonGetter(PrintPreviewFocusManager);
17 18
18 PrintPreviewFocusManager.prototype = { 19 PrintPreviewFocusManager.prototype = {
19 __proto__: cr.ui.FocusManager.prototype, 20 __proto__: cr.ui.FocusManager.prototype,
20 21
21 /** @override */ 22 /** @override */
22 getFocusParent: function() { 23 getFocusParent: function() {
23 return document.querySelector('.overlay:not([hidden])') || 24 return document.querySelector('.overlay:not([hidden])') ||
24 document.body; 25 document.body;
25 } 26 }
26 }; 27 };
27 28
28 // Export 29 // Export
29 return { 30 return {
30 PrintPreviewFocusManager: PrintPreviewFocusManager 31 PrintPreviewFocusManager: PrintPreviewFocusManager
31 }; 32 };
32 }); 33 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview.js ('k') | chrome/browser/resources/print_preview/print_preview_utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698