function PrintPreview() {
    print_preview.Component.call(this);

    /**
     * Used to communicate with Chromium's print system.
     * @type {!print_preview.NativeLayer}
     * @private
     */
    this.nativeLayer_ = print_preview.NativeLayer.getInstance();

    /**
     * Event target that contains information about the logged in user.
     * @type {!print_preview.UserInfo}
     * @private
     */
    this.userInfo_ = new print_preview.UserInfo();

    /**
     * Data store which holds print destinations.
     * @type {!print_preview.DestinationStore}
     * @private
     */
    this.destinationStore_ = new print_preview.DestinationStore(
        this.userInfo_, this.listenerTracker);

    /**
     * Application state.
     * @type {!print_preview.AppState}
     * @private
     */
    this.appState_ = new print_preview.AppState(this.destinationStore_);

    /**
     * Data model that holds information about the document to print.
     * @type {!print_preview.DocumentInfo}
     * @private
     */
    this.documentInfo_ = new print_preview.DocumentInfo();

    /**
     * Data store which holds printer sharing invitations.
     * @type {!print_preview.InvitationStore}
     * @private
     */
    this.invitationStore_ = new print_preview.InvitationStore(this.userInfo_);

    /**
     * Storage of the print ticket used to create the print job.
     * @type {!print_preview.PrintTicketStore}
     * @private
     */
    this.printTicketStore_ = new print_preview.PrintTicketStore(
        this.destinationStore_, this.appState_, this.documentInfo_);

    /**
     * Holds the print and cancel buttons and renders some document statistics.
     * @type {!print_preview.PrintHeader}
     * @private
     */
    this.printHeader_ = new print_preview.PrintHeader(
        this.printTicketStore_, this.destinationStore_);
    this.addChild(this.printHeader_);

    /**
     * Component used to search for print destinations.
     * @type {!print_preview.DestinationSearch}
     * @private
     */
    this.destinationSearch_ = new print_preview.DestinationSearch(
        this.destinationStore_, this.invitationStore_, this.userInfo_,
        this.appState_);
    this.addChild(this.destinationSearch_);

    /**
     * Component that renders the print destination.
     * @type {!print_preview.DestinationSettings}
     * @private
     */
    this.destinationSettings_ =
        new print_preview.DestinationSettings(this.destinationStore_);
    this.addChild(this.destinationSettings_);

    /**
     * Component that renders UI for entering in page range.
     * @type {!print_preview.PageSettings}
     * @private
     */
    this.pageSettings_ =
        new print_preview.PageSettings(this.printTicketStore_.pageRange);
    this.addChild(this.pageSettings_);

    /**
     * Component that renders the copies settings.
     * @type {!print_preview.CopiesSettings}
     * @private
     */
    this.copiesSettings_ = new print_preview.CopiesSettings(
        this.printTicketStore_.copies, this.printTicketStore_.collate);
    this.addChild(this.copiesSettings_);

    /**
     * Component that renders the layout settings.
     * @type {!print_preview.LayoutSettings}
     * @private
     */
    this.layoutSettings_ =
        new print_preview.LayoutSettings(this.printTicketStore_.landscape);
    this.addChild(this.layoutSettings_);

    /**
     * Component that renders the color options.
     * @type {!print_preview.ColorSettings}
     * @private
     */
    this.colorSettings_ =
        new print_preview.ColorSettings(this.printTicketStore_.color);
    this.addChild(this.colorSettings_);

    /**
     * Component that renders the media size settings.
     * @type {!print_preview.MediaSizeSettings}
     * @private
     */
    this.mediaSizeSettings_ =
        new print_preview.MediaSizeSettings(this.printTicketStore_.mediaSize);
    this.addChild(this.mediaSizeSettings_);

    /**
     * Component that renders a select box for choosing margin settings.
     * @type {!print_preview.MarginSettings}
     * @private
     */
    this.marginSettings_ =
        new print_preview.MarginSettings(this.printTicketStore_.marginsType);
    this.addChild(this.marginSettings_);

    /**
     * Component that renders the DPI settings.
     * @type {!print_preview.DpiSettings}
     * @private
     */
    this.dpiSettings_ =
        new print_preview.DpiSettings(this.printTicketStore_.dpi);
    this.addChild(this.dpiSettings_);

    /**
     * Component that renders the scaling settings.
     * @type {!print_preview.ScalingSettings}
     * @private
     */
    this.scalingSettings_ = new print_preview.ScalingSettings(
        this.printTicketStore_.scaling, this.printTicketStore_.fitToPage);
    this.addChild(this.scalingSettings_);

    /**
     * Component that renders miscellaneous print options.
     * @type {!print_preview.OtherOptionsSettings}
     * @private
     */
    this.otherOptionsSettings_ = new print_preview.OtherOptionsSettings(
        this.printTicketStore_.duplex, this.printTicketStore_.cssBackground,
        this.printTicketStore_.selectionOnly,
        this.printTicketStore_.headerFooter, this.printTicketStore_.rasterize);
    this.addChild(this.otherOptionsSettings_);

    /**
     * Component that renders the advanced options button.
     * @type {!print_preview.AdvancedOptionsSettings}
     * @private
     */
    this.advancedOptionsSettings_ = new print_preview.AdvancedOptionsSettings(
        this.printTicketStore_.vendorItems, this.destinationStore_);
    this.addChild(this.advancedOptionsSettings_);

    /**
     * Component used to search for print destinations.
     * @type {!print_preview.AdvancedSettings}
     * @private
     */
    this.advancedSettings_ =
        new print_preview.AdvancedSettings(this.printTicketStore_);
    this.addChild(this.advancedSettings_);

    const settingsSections = [
      this.destinationSettings_, this.pageSettings_, this.copiesSettings_,
      this.mediaSizeSettings_, this.layoutSettings_, this.marginSettings_,
      this.colorSettings_, this.dpiSettings_, this.scalingSettings_,
      this.otherOptionsSettings_, this.advancedOptionsSettings_
    ];

    /**
     * Component representing more/less settings button.
     * @type {!print_preview.MoreSettings}
     * @private
     */
    this.moreSettings_ = new print_preview.MoreSettings(
        this.destinationStore_, settingsSections);
    this.addChild(this.moreSettings_);

    /**
     * Area of the UI that holds the print preview.
     * @type {!print_preview.PreviewArea}
     * @private
     */
    this.previewArea_ = new print_preview.PreviewArea(
        this.destinationStore_, this.printTicketStore_, this.documentInfo_);
    this.addChild(this.previewArea_);

    /**
     * Interface to the Google Cloud Print API. Null if Google Cloud Print
     * integration is disabled.
     * @type {cloudprint.CloudPrintInterface}
     * @private
     */
    this.cloudPrintInterface_ = null;

    /**
     * Whether in kiosk mode where print preview can print automatically without
     * user intervention. See http://crbug.com/31395. Print will start when
     * both the print ticket has been initialized, and an initial printer has
     * been selected.
     * @type {boolean}
     * @private
     */
    this.isInKioskAutoPrintMode_ = false;

    /**
     * Whether Print Preview is in App Kiosk mode, basically, use only printers
     * available for the device.
     * @type {boolean}
     * @private
     */
    this.isInAppKioskMode_ = false;

    /**
     * Whether Print with System Dialog link should be hidden. Overrides the
     * default rules for System dialog link visibility.
     * @type {boolean}
     * @private
     */
    this.hideSystemDialogLink_ = true;

    /**
     * State of the print preview UI.
     * @type {print_preview.PrintPreviewUiState_}
     * @private
     */
    this.uiState_ = PrintPreviewUiState_.INITIALIZING;

    /**
     * Whether document preview generation is in progress.
     * @type {boolean}
     * @private
     */
    this.isPreviewGenerationInProgress_ = true;

    /**
     * Whether to show system dialog before next printing.
     * @type {boolean}
     * @private
     */
    this.showSystemDialogBeforeNextPrint_ = false;

    /**
     * Whether the preview is listening for the manipulate-settings-for-test
     * UI event.
     * @private {boolean}
     */
    this.isListeningForManipulateSettings_ = false;
  }
/**
   * Container class for Chromium's print preview.
   * @constructor
   * @extends {print_preview.Component}
   */
Container class for Chromium's print preview.
Container class for Chromium ' s print preview .
function PrintPreview() {
    print_preview.Component.call(this);
    this.nativeLayer_ = print_preview.NativeLayer.getInstance();
    this.userInfo_ = new print_preview.UserInfo();
    this.destinationStore_ = new print_preview.DestinationStore(
        this.userInfo_, this.listenerTracker);
    this.appState_ = new print_preview.AppState(this.destinationStore_);
    this.documentInfo_ = new print_preview.DocumentInfo();
    this.invitationStore_ = new print_preview.InvitationStore(this.userInfo_);
    this.printTicketStore_ = new print_preview.PrintTicketStore(
        this.destinationStore_, this.appState_, this.documentInfo_);
    this.printHeader_ = new print_preview.PrintHeader(
        this.printTicketStore_, this.destinationStore_);
    this.addChild(this.printHeader_);
    this.destinationSearch_ = new print_preview.DestinationSearch(
        this.destinationStore_, this.invitationStore_, this.userInfo_,
        this.appState_);
    this.addChild(this.destinationSearch_);
    this.destinationSettings_ =
        new print_preview.DestinationSettings(this.destinationStore_);
    this.addChild(this.destinationSettings_);
    this.pageSettings_ =
        new print_preview.PageSettings(this.printTicketStore_.pageRange);
    this.addChild(this.pageSettings_);
    this.copiesSettings_ = new print_preview.CopiesSettings(
        this.printTicketStore_.copies, this.printTicketStore_.collate);
    this.addChild(this.copiesSettings_);
    this.layoutSettings_ =
        new print_preview.LayoutSettings(this.printTicketStore_.landscape);
    this.addChild(this.layoutSettings_);
    this.colorSettings_ =
        new print_preview.ColorSettings(this.printTicketStore_.color);
    this.addChild(this.colorSettings_);
    this.mediaSizeSettings_ =
        new print_preview.MediaSizeSettings(this.printTicketStore_.mediaSize);
    this.addChild(this.mediaSizeSettings_);
    this.marginSettings_ =
        new print_preview.MarginSettings(this.printTicketStore_.marginsType);
    this.addChild(this.marginSettings_);
    this.dpiSettings_ =
        new print_preview.DpiSettings(this.printTicketStore_.dpi);
    this.addChild(this.dpiSettings_);
    this.scalingSettings_ = new print_preview.ScalingSettings(
        this.printTicketStore_.scaling, this.printTicketStore_.fitToPage);
    this.addChild(this.scalingSettings_);
    this.otherOptionsSettings_ = new print_preview.OtherOptionsSettings(
        this.printTicketStore_.duplex, this.printTicketStore_.cssBackground,
        this.printTicketStore_.selectionOnly,
        this.printTicketStore_.headerFooter, this.printTicketStore_.rasterize);
    this.addChild(this.otherOptionsSettings_);
    this.advancedOptionsSettings_ = new print_preview.AdvancedOptionsSettings(
        this.printTicketStore_.vendorItems, this.destinationStore_);
    this.addChild(this.advancedOptionsSettings_);
    this.advancedSettings_ =
        new print_preview.AdvancedSettings(this.printTicketStore_);
    this.addChild(this.advancedSettings_);
    const settingsSections = [
      this.destinationSettings_, this.pageSettings_, this.copiesSettings_,
      this.mediaSizeSettings_, this.layoutSettings_, this.marginSettings_,
      this.colorSettings_, this.dpiSettings_, this.scalingSettings_,
      this.otherOptionsSettings_, this.advancedOptionsSettings_
    ];
    this.moreSettings_ = new print_preview.MoreSettings(
        this.destinationStore_, settingsSections);
    this.addChild(this.moreSettings_);
    this.previewArea_ = new print_preview.PreviewArea(
        this.destinationStore_, this.printTicketStore_, this.documentInfo_);
    this.addChild(this.previewArea_);
    this.cloudPrintInterface_ = null;
    this.isInKioskAutoPrintMode_ = false;
    this.isInAppKioskMode_ = false;
    this.hideSystemDialogLink_ = true;
    this.uiState_ = PrintPreviewUiState_.INITIALIZING;
    this.isPreviewGenerationInProgress_ = true;
    this.showSystemDialogBeforeNextPrint_ = false;
    this.isListeningForManipulateSettings_ = false;
  }
function PrintPreview ( ) { print_preview . Component . call ( this ) ; this . nativeLayer_ = print_preview . NativeLayer . getInstance ( ) ; this . userInfo_ = new print_preview . UserInfo ( ) ; this . destinationStore_ = new print_preview . DestinationStore ( this . userInfo_ , this . listenerTracker ) ; this . appState_ = new print_preview . AppState ( this . destinationStore_ ) ; this . documentInfo_ = new print_preview . DocumentInfo ( ) ; this . invitationStore_ = new print_preview . InvitationStore ( this . userInfo_ ) ; this . printTicketStore_ = new print_preview . PrintTicketStore ( this . destinationStore_ , this . appState_ , this . documentInfo_ ) ; this . printHeader_ = new print_preview . PrintHeader ( this . printTicketStore_ , this . destinationStore_ ) ; this . addChild ( this . printHeader_ ) ; this . destinationSearch_ = new print_preview . DestinationSearch ( this . destinationStore_ , this . invitationStore_ , this . userInfo_ , this . appState_ ) ; this . addChild ( this . destinationSearch_ ) ; this . destinationSettings_ = new print_preview . DestinationSettings ( this . destinationStore_ ) ; this . addChild ( this . destinationSettings_ ) ; this . pageSettings_ = new print_preview . PageSettings ( this . printTicketStore_ . pageRange ) ; this . addChild ( this . pageSettings_ ) ; this . copiesSettings_ = new print_preview . CopiesSettings ( this . printTicketStore_ . copies , this . printTicketStore_ . collate ) ; this . addChild ( this . copiesSettings_ ) ; this . layoutSettings_ = new print_preview . LayoutSettings ( this . printTicketStore_ . landscape ) ; this . addChild ( this . layoutSettings_ ) ; this . colorSettings_ = new print_preview . ColorSettings ( this . printTicketStore_ . color ) ; this . addChild ( this . colorSettings_ ) ; this . mediaSizeSettings_ = new print_preview . MediaSizeSettings ( this . printTicketStore_ . mediaSize ) ; this . addChild ( this . mediaSizeSettings_ ) ; this . marginSettings_ = new print_preview . MarginSettings ( this . printTicketStore_ . marginsType ) ; this . addChild ( this . marginSettings_ ) ; this . dpiSettings_ = new print_preview . DpiSettings ( this . printTicketStore_ . dpi ) ; this . addChild ( this . dpiSettings_ ) ; this . scalingSettings_ = new print_preview . ScalingSettings ( this . printTicketStore_ . scaling , this . printTicketStore_ . fitToPage ) ; this . addChild ( this . scalingSettings_ ) ; this . otherOptionsSettings_ = new print_preview . OtherOptionsSettings ( this . printTicketStore_ . duplex , this . printTicketStore_ . cssBackground , this . printTicketStore_ . selectionOnly , this . printTicketStore_ . headerFooter , this . printTicketStore_ . rasterize ) ; this . addChild ( this . otherOptionsSettings_ ) ; this . advancedOptionsSettings_ = new print_preview . AdvancedOptionsSettings ( this . printTicketStore_ . vendorItems , this . destinationStore_ ) ; this . addChild ( this . advancedOptionsSettings_ ) ; this . advancedSettings_ = new print_preview . AdvancedSettings ( this . printTicketStore_ ) ; this . addChild ( this . advancedSettings_ ) ; const settingsSections = [ this . destinationSettings_ , this . pageSettings_ , this . copiesSettings_ , this . mediaSizeSettings_ , this . layoutSettings_ , this . marginSettings_ , this . colorSettings_ , this . dpiSettings_ , this . scalingSettings_ , this . otherOptionsSettings_ , this . advancedOptionsSettings_ ] ; this . moreSettings_ = new print_preview . MoreSettings ( this . destinationStore_ , settingsSections ) ; this . addChild ( this . moreSettings_ ) ; this . previewArea_ = new print_preview . PreviewArea ( this . destinationStore_ , this . printTicketStore_ , this . documentInfo_ ) ; this . addChild ( this . previewArea_ ) ; this . cloudPrintInterface_ = null ; this . isInKioskAutoPrintMode_ = false ; this . isInAppKioskMode_ = false ; this . hideSystemDialogLink_ = true ; this . uiState_ = PrintPreviewUiState_ . INITIALIZING ; this . isPreviewGenerationInProgress_ = true ; this . showSystemDialogBeforeNextPrint_ = false ; this . isListeningForManipulateSettings_ = false ; }
Container class for Chromium's print preview.
Container class for Chromium ' s print preview .
/**
     * Used to communicate with Chromium's print system.
     * @type {!print_preview.NativeLayer}
     * @private
     */ /**
     * Event target that contains information about the logged in user.
     * @type {!print_preview.UserInfo}
     * @private
     */ /**
     * Data store which holds print destinations.
     * @type {!print_preview.DestinationStore}
     * @private
     */ /**
     * Application state.
     * @type {!print_preview.AppState}
     * @private
     */ /**
     * Data model that holds information about the document to print.
     * @type {!print_preview.DocumentInfo}
     * @private
     */ /**
     * Data store which holds printer sharing invitations.
     * @type {!print_preview.InvitationStore}
     * @private
     */ /**
     * Storage of the print ticket used to create the print job.
     * @type {!print_preview.PrintTicketStore}
     * @private
     */ /**
     * Holds the print and cancel buttons and renders some document statistics.
     * @type {!print_preview.PrintHeader}
     * @private
     */ /**
     * Component used to search for print destinations.
     * @type {!print_preview.DestinationSearch}
     * @private
     */ /**
     * Component that renders the print destination.
     * @type {!print_preview.DestinationSettings}
     * @private
     */ /**
     * Component that renders UI for entering in page range.
     * @type {!print_preview.PageSettings}
     * @private
     */ /**
     * Component that renders the copies settings.
     * @type {!print_preview.CopiesSettings}
     * @private
     */ /**
     * Component that renders the layout settings.
     * @type {!print_preview.LayoutSettings}
     * @private
     */ /**
     * Component that renders the color options.
     * @type {!print_preview.ColorSettings}
     * @private
     */ /**
     * Component that renders the media size settings.
     * @type {!print_preview.MediaSizeSettings}
     * @private
     */ /**
     * Component that renders a select box for choosing margin settings.
     * @type {!print_preview.MarginSettings}
     * @private
     */ /**
     * Component that renders the DPI settings.
     * @type {!print_preview.DpiSettings}
     * @private
     */ /**
     * Component that renders the scaling settings.
     * @type {!print_preview.ScalingSettings}
     * @private
     */ /**
     * Component that renders miscellaneous print options.
     * @type {!print_preview.OtherOptionsSettings}
     * @private
     */ /**
     * Component that renders the advanced options button.
     * @type {!print_preview.AdvancedOptionsSettings}
     * @private
     */ /**
     * Component used to search for print destinations.
     * @type {!print_preview.AdvancedSettings}
     * @private
     */ /**
     * Component representing more/less settings button.
     * @type {!print_preview.MoreSettings}
     * @private
     */ /**
     * Area of the UI that holds the print preview.
     * @type {!print_preview.PreviewArea}
     * @private
     */ /**
     * Interface to the Google Cloud Print API. Null if Google Cloud Print
     * integration is disabled.
     * @type {cloudprint.CloudPrintInterface}
     * @private
     */ /**
     * Whether in kiosk mode where print preview can print automatically without
     * user intervention. See http://crbug.com/31395. Print will start when
     * both the print ticket has been initialized, and an initial printer has
     * been selected.
     * @type {boolean}
     * @private
     */ /**
     * Whether Print Preview is in App Kiosk mode, basically, use only printers
     * available for the device.
     * @type {boolean}
     * @private
     */ /**
     * Whether Print with System Dialog link should be hidden. Overrides the
     * default rules for System dialog link visibility.
     * @type {boolean}
     * @private
     */ /**
     * State of the print preview UI.
     * @type {print_preview.PrintPreviewUiState_}
     * @private
     */ /**
     * Whether document preview generation is in progress.
     * @type {boolean}
     * @private
     */ /**
     * Whether to show system dialog before next printing.
     * @type {boolean}
     * @private
     */ /**
     * Whether the preview is listening for the manipulate-settings-for-test
     * UI event.
     * @private {boolean}
     */