summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/settings/android_apps_page/android_apps_page.html
blob: 91ab92092e97ee3bf37d27fdec1fa601265dcdeb (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
<link rel="import" href="chrome://resources/html/polymer.html">

<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_link_row/cr_link_row.html">
<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_indicator.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="../i18n_setup.html">
<link rel="import" href="../prefs/prefs_behavior.html">
<link rel="import" href="../settings_page/settings_animated_pages.html">
<link rel="import" href="../settings_page/settings_subpage.html">
<link rel="import" href="../settings_shared_css.html">
<link rel="import" href="android_apps_browser_proxy.html">
<link rel="import" href="android_apps_subpage.html">

<!-- Changes to this file should be reflected in
    ../chromeos/os_apps_page/os_apps_page.html.
    TODO(crbug.com/1006152): This file should be deleted once the split-settings
    flag has been removed. -->

<dom-module id="settings-android-apps-page">
  <template>
    <style include="settings-shared"></style>

    <settings-animated-pages id="pages" section="androidApps"
        focus-config="[[focusConfig_]]">
      <div route-path="default">
        <template is="dom-if" if="[[havePlayStoreApp]]" restamp>
          <div id="android-apps" class="settings-box first"
              actionable$="[[androidAppsInfo.playStoreEnabled]]"
              on-click="onSubpageTap_">
            <div class="start settings-box-text">
              $i18n{androidAppsPageLabel}
              <div class="secondary" id="secondaryText"
                  inner-h-t-m-l="[[i18nAdvanced('androidAppsSubtext')]]">
              </div>
            </div>
            <cr-policy-pref-indicator pref="[[prefs.arc.enabled]]"
                icon-aria-label="$i18n{androidAppsPageTitle}">
            </cr-policy-pref-indicator>
            <template is="dom-if" if="[[androidAppsInfo.playStoreEnabled]]">
              <cr-icon-button class="subpage-arrow"
                  aria-label="$i18n{androidAppsPageTitle}"
                  aria-describedby="secondaryText"></cr-icon-button>
            </template>
            <template is="dom-if" if="[[!androidAppsInfo.playStoreEnabled]]">
              <div class="separator"></div>
              <cr-button id="enable"
                  disabled="[[isEnforced_(prefs.arc.enabled)]]"
                  on-click="onEnableTap_"
                  aria-label="$i18n{androidAppsPageTitle}"
                  aria-describedby="secondaryText">
                $i18n{androidAppsEnable}
              </cr-button>
            </template>
          </div>
        </template>
        <template is="dom-if" if="[[!havePlayStoreApp]]" restamp>
          <cr-link-row id="manageApps" label="$i18n{androidAppsManageApps}"
              on-click="onManageAndroidAppsTap_" external>
          </cr-link-row>
        </template>
      </div>

      <template is="dom-if" route-path="/androidApps/details">
        <settings-subpage
            associated-control="[[$$('#android-apps')]]"
            page-title="$i18n{androidAppsPageLabel}">
          <settings-android-apps-subpage
              android-apps-info="[[androidAppsInfo]]" prefs="{{prefs}}">
          </settings-android-apps-subpage>
        </settings-subpage>
      </template>
    </settings-animated-pages>

  </template>
  <script src="android_apps_page.js"></script>
</dom-module>