File: app.html

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (120 lines) | stat: -rw-r--r-- 5,467 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<div id="content">
  ${this.lazyRender_ && this.microsoftModuleEnabled_ ? html`
    <iframe id="microsoftAuth" src="${this.microsoftAuthIframePath_}"></iframe>
  ` : ''}
  ${this.lazyRender_ && this.oneGoogleBarEnabled_ ? html`
    <div id="oneGoogleBarScrim" ?hidden="${!this.showBackgroundImage_}"
        ?fixed="${this.scrolledToTop_}"></div>
    <ntp-iframe id="oneGoogleBar" src="${this.oneGoogleBarIframePath_}"
        ?hidden="${!this.oneGoogleBarLoaded_}"
        allow="camera ${this.oneGoogleBarIframeOrigin_}; display-capture ${this.oneGoogleBarIframeOrigin_}"> <!-- presubmit: ignore-long-line -->
    </ntp-iframe>
  ` : ''}
  <!-- TODO(crbug.com/40743294): Instead of ?hidden="${!this.logoEnabled_}" it would
       be nicer to use Lit's conditional rendering. However, that breaks
       StartupBrowserCreatorPickerNoParamsTest.ShowPickerWhenAlreadyLaunched on
       the msan builder. See crbug.com/1169070. -->
  <ntp-logo id="logo" ?single-colored="${this.singleColoredLogo_}"
      .dark="${this.isThemeDark_()}" .backgroundColor="${this.backgroundColor_}"
      ?hidden="${!this.logoEnabled_}">
  </ntp-logo>
  <div id="searchboxContainer">
    <cr-searchbox id="searchbox" ?is-dark="${this.isThemeDark_()}"
        ?color-source-is-baseline="${this.colorSourceIsBaseline}"
        @open-lens-search="${this.onOpenLensSearch_}"
        @open-voice-search="${this.onOpenVoiceSearch_}" ?shown="${this.realboxShown_}"
        ?had-secondary-side="${this.realboxHadSecondarySide}"
        @had-secondary-side-changed="${this.onRealboxHadSecondarySideChanged_}"
        ?can-show-secondary-side="${this.realboxCanShowSecondarySide}"
        ?compose-button-enabled="${this.composeButtonEnabled}"
        ?composebox-enabled="${this.composeboxEnabled}">
    </cr-searchbox>
    ${this.showLensUploadDialog_ ? html`
      <ntp-lens-upload-dialog id="lensUploadDialog"
          @close-lens-search="${this.onCloseLensSearch_}">
      </ntp-lens-upload-dialog>
    ` : ''}
  </div>
  ${this.lazyRender_ ? html`
    <cr-toast id="webstoreToast" duration="10000" hidden>
      <div>$i18n{webstoreThemesToastMessage}</div>
      <cr-button @click="${this.onWebstoreToastButtonClick_}">
        $i18n{webstoreThemesToastButtonText}
      </cr-button>
    </cr-toast>
  ` : ''}
  ${this.lazyRender_ ? html`
    ${this.shortcutsEnabled_ ? html`
      <cr-most-visited id="mostVisited" .theme="${this.theme_?.mostVisited || null}"
          single-row reflow-on-overflow>
      </cr-most-visited>
    ` : ''}
    ${this.middleSlotPromoEnabled_ ? html`
      <ntp-middle-slot-promo
          @ntp-middle-slot-promo-loaded="${this.onMiddleSlotPromoLoaded_}"
          ?hidden="${!this.promoAndModulesLoaded_}">
      </ntp-middle-slot-promo>
    ` : ''}
    ${this.modulesEnabled_ ? html`
      ${html`
        <ntp-modules id="modules"
            ?modules-shown-to-user="${this.modulesShownToUser}"
            @modules-shown-to-user-changed="${this.onModulesShownToUserChanged_}"
            @customize-module="${this.onCustomizeModule_}"
            @modules-loaded="${this.onModulesLoaded_}"
            ?hidden="${!this.promoAndModulesLoaded_}">
        </ntp-modules>
      `}
    ` : ''}
    <a id="backgroundImageAttribution"
        href="${this.backgroundImageAttributionUrl_}"
        ?hidden="${!this.backgroundImageAttribution1_}">
      <div id="backgroundImageAttribution1Container">
        <div id="linkIcon" ?hidden="${!this.backgroundImageAttributionUrl_}"></div>
        <div id="backgroundImageAttribution1">
          ${this.backgroundImageAttribution1_}
        </div>
      </div>
      <div id="backgroundImageAttribution2"
          ?hidden="${!this.backgroundImageAttribution2_}">
        ${this.backgroundImageAttribution2_}
      </div>
    </a>
    <!-- TODO(crbug.com/409296433) Hide ntp-customize-buttons on new-tab-page when
      footer is enabled and visible. -->
    <ntp-customize-buttons id="customizeButtons"
        ?modules-shown-to-user="${this.modulesShownToUser}"
        ?show-background-image="${this.showBackgroundImage_}"
        ?show-customize="${this.showCustomize_}"
        ?show-customize-chrome-text="${this.showCustomizeChromeText_}"
        ?show-wallpaper-search="${this.showWallpaperSearch_}"
        ?show-wallpaper-search-button="${this.showWallpaperSearchButton_}"
        ?wallpaper-search-button-animation-enabled="${this.wallpaperSearchButtonAnimationEnabled_}"
        @customize-click="${this.onCustomizeClick_}"
        @wallpaper-search-click="${this.onWallpaperSearchClick_}">
    </ntp-customize-buttons>
    ${this.showThemeAttribution_() ? html`
      <div id="themeAttribution">
        <div>$i18n{themeCreatedBy}</div>
        <img src="${this.theme_!.backgroundImage!.attributionUrl!.url}">
      </div>
    ` : ''}
  ` : ''}
  <div id="contentBottomSpacer"></div>
</div>
${this.showVoiceSearchOverlay_ ? html`
  <ntp-voice-search-overlay @close="${this.onVoiceSearchOverlayClose_}">
  </ntp-voice-search-overlay>
` : ''}
<svg>
  <defs>
    <clipPath id="oneGoogleBarClipPath">
      <!-- Set an initial non-empty clip-path so the OneGoogleBar resize events
           are processed. When the clip-path is empty, it's possible for the
           OneGoogleBar to get into a state where it does not send  the
           'overlayUpdates' message which is used to populate this
           clip-path. -->
      <rect x="0" y="0" width="1" height="1"></rect>
    </clipPath>
  </defs>
</svg>