summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/settings/downloads_page/downloads_page.html
blob: 089b55a6b03e3f60fa12b6512da134816c9c670e (plain)
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
<link rel="import" href="chrome://resources/html/polymer.html">

<link rel="import" href="chrome://resources/html/util.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="../controls/controlled_button.html">
<link rel="import" href="../controls/settings_toggle_button.html">
<link rel="import" href="../route.html">
<link rel="import" href="../settings_shared_css.html">
<link rel="import" href="downloads_browser_proxy.html">
<if expr="chromeos">
<link rel="import" href="smb_shares_page.html">
</if>

<dom-module id="settings-downloads-page">
  <template>
    <style include="settings-shared">
      .block {
        display: block;
      }
    </style>
  <settings-animated-pages id="pages" section="downloads"
      focus-config="[[focusConfig_]]">
    <neon-animatable route-path="default">
    <div class="settings-box first two-line">
      <div class="start">
        <div>$i18n{downloadLocation}</div>
        <div class="secondary" no-search>
<if expr="not chromeos">
          [[prefs.download.default_directory.value]]
</if>
<if expr="chromeos">
          [[getDownloadLocation_(prefs.download.default_directory.value)]]
</if>
        </div>
      </div>
      <div class="separator"></div>
      <controlled-button class="secondary-button" id="changeDownloadsPath"
          label="$i18n{changeDownloadLocation}"
          on-click="selectDownloadLocation_"
          pref="[[prefs.download.default_directory]]"
          end-justified>
      </controlled-button>
    </div>
    <settings-toggle-button
        pref="{{prefs.download.prompt_for_download}}"
        label="$i18n{promptForDownload}">
    </settings-toggle-button>
<if expr="chromeos">
    <settings-toggle-button class="continuation"
        pref="{{prefs.gdata.disabled}}"
        label="$i18n{disconnectGoogleDriveAccount}"
        hidden="[[!pageVisibility.googleDrive]]">
    </settings-toggle-button>
</if>
<if expr="chromeos">
  <template is="dom-if" if="[[enableSmbSettings_]]">
    <div id="smbShares" class="settings-box"
        on-click="onTapSmbShares_" actionable>
      <div class="start"> $i18n{smbSharesTitle} </div>
      <paper-icon-button-light class="subpage-arrow">
        <button aria-label="$i18n{smbSharesTitle}"></button>
      </paper-icon-button-light>
    </div>
  </template>
</if>
</neon-animatable>
    <template is="dom-if" if="[[autoOpenDownloads_]]" restamp>
      <div class="settings-box">
        <div class="start">
          $i18n{openFileTypesAutomatically}
        </div>
        <div class="separator"></div>
        <paper-button id="resetAutoOpenFileTypes" class="secondary-button"
            on-click="onClearAutoOpenFileTypesTap_">
          $i18n{clear}
        </paper-button>
      </div>
    </template>
<if expr="chromeos">
      <template is="dom-if" route-path="/smbShares">
        <settings-subpage
            associated-control="[[$$('#smbShares')]]"
            page-title="$i18n{smbSharesTitle}">
          <settings-smb-shares-page>
          </settings-smb-shares-page>
        </settings-subpage>
      </template>
</if>
  </settings-animated-pages>
  </template>
  <script src="downloads_page.js"></script>
</dom-module>