<?xml version="1.0"?>
<!-- -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
   - This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
<!ENTITY % privacyDTD SYSTEM "chrome://messenger/locale/preferences/privacy.dtd">
%brandDTD;
%privacyDTD;
]>

<overlay id="PrivacyPaneOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <prefpane id="panePrivacy" onpaneload="gPrivacyPane.init();">
    <script type="application/javascript" src="chrome://messenger/content/preferences/privacy.js"/>

    <stringbundle id="bundlePreferences" src="chrome://messenger/locale/preferences/preferences.properties"/>

    <preferences id="privacyPreferences">

      <!-- XXX button prefs -->
      <preference id="pref.privacy.disable_button.cookie_exceptions"
                  name="pref.privacy.disable_button.cookie_exceptions"
                  type="bool"/>
      <preference id="pref.privacy.disable_button.view_cookies"
                  name="pref.privacy.disable_button.view_cookies"
                  type="bool"/>

      <!-- Remote Content -->
      <preference id="mailnews.message_display.disable_remote_image"
                  name="mailnews.message_display.disable_remote_image"
                  type="bool" inverted="true"
                  onchange="gPrivacyPane.reloadMessageInOpener();"/>

      <!-- History -->
      <preference id="places.history.enabled"
                  name="places.history.enabled"
                  type="bool"/>

      <!-- Cookies -->
      <preference id="network.cookie.cookieBehavior"
                  name="network.cookie.cookieBehavior"
                  type="int"/>
      <preference id="network.cookie.lifetimePolicy"
                  name="network.cookie.lifetimePolicy"
                  type="int"/>
      <preference id="network.cookie.blockFutureCookies"
                  name="network.cookie.blockFutureCookies"
                  type="bool"/>

      <!-- Tracking -->
      <preference id="privacy.donottrackheader.enabled"
                  name="privacy.donottrackheader.enabled"
                  type="bool"/>
    </preferences>

    <!-- Mail Content -->
    <groupbox id="mailContentGroup">
      <caption label="&captionMailContent.label;"/>
      <hbox id="remoteContentBox">
        <checkbox id="acceptRemoteContent"
                  preference="mailnews.message_display.disable_remote_image"
                  label="&acceptRemoteContent.label;"
                  accesskey="&acceptRemoteContent.accesskey;"/>
        <spacer flex="1"/>
        <button id="remoteContentExceptions"
                oncommand="gPrivacyPane.showRemoteContentExceptions();"
                label="&remoteContentExceptions.label;"
                accesskey="&remoteContentExceptions.accesskey;"/>
      </hbox>
      <hbox>
        <label id="acceptRemoteContentInfo"
               class="text-link"
               href="https://support.mozilla.org/kb/remote-content-in-messages"
               value="&acceptRemoteContentInfo.label;"/>
        <spacer flex="1"/>
      </hbox>
    </groupbox>

    <!-- Web Content -->
    <groupbox id="webContentGroup">
      <caption label="&captionWebContent.label;"/>
      <checkbox id="keepHistory"
                preference="places.history.enabled"
                label="&keepHistory.label;"
                accesskey="&keepHistory.accesskey;"/>
      <hbox id="cookiesBox">
        <checkbox id="acceptCookies"
                  preference="network.cookie.cookieBehavior"
                  label="&acceptCookies.label;"
                  accesskey="&acceptCookies.accesskey;"
                  onsyncfrompreference="return gPrivacyPane.readAcceptCookies();"
                  onsynctopreference="return gPrivacyPane.writeAcceptCookies();"/>
        <spacer flex="1"/>
        <button id="cookieExceptions"
                oncommand="gPrivacyPane.showCookieExceptions();"
                label="&cookieExceptions.label;"
                accesskey="&cookieExceptions.accesskey;"
                preference="pref.privacy.disable_button.cookie_exceptions"/>
      </hbox>
      <hbox id="acceptThirdPartyRow" class="indent">
        <hbox id="acceptThirdPartyBox" align="center">
          <label id="acceptThirdPartyLabel" control="acceptThirdPartyMenu"
                 accesskey="&acceptThirdParty.pre.accesskey;">&acceptThirdParty.pre.label;</label>
          <menulist id="acceptThirdPartyMenu" preference="network.cookie.cookieBehavior"
          onsyncfrompreference="return gPrivacyPane.readAcceptThirdPartyCookies();"
          onsynctopreference="return gPrivacyPane.writeAcceptThirdPartyCookies();">
            <menupopup>
              <menuitem label="&acceptThirdParty.always.label;" value="always"/>
              <menuitem label="&acceptThirdParty.visited.label;" value="visited"/>
              <menuitem label="&acceptThirdParty.never.label;" value="never"/>
            </menupopup>
          </menulist>
        </hbox>
      </hbox>
      <hbox id="keepRow" class="indent">
        <hbox id="keepBox" align="center">
          <label id="keepUntil"
                 control="keepCookiesUntil"
                 accesskey="&keepUntil.accesskey;">&keepUntil.label;</label>
          <menulist id="keepCookiesUntil"
                    preference="network.cookie.lifetimePolicy">
            <menupopup>
              <menuitem label="&expire.label;" value="0"/>
              <menuitem label="&close.label;" value="2"/>
              <menuitem label="&askEachTime.label;" value="1"/>
            </menupopup>
          </menulist>
        </hbox>
        <hbox flex="1"/>
        <button id="showCookiesButton" label="&showCookies.label;"
                accesskey="&showCookies.accesskey;"
                oncommand="gPrivacyPane.showCookies();"
                preference="pref.privacy.disable_button.view_cookies"/>
      </hbox>

      <separator class="thin"/>

      <hbox>
        <checkbox id="privacyDoNotTrackCheckbox"
                  label="&dntTrackingNotOkay.label2;"
                  accesskey="&dntTrackingNotOkay.accesskey;"
                  preference="privacy.donottrackheader.enabled"/>
        <spacer flex="1"/>
      </hbox>
      <hbox>
        <label id="doNotTrackInfo"
               class="text-link"
               href="https://www.mozilla.org/dnt"
               value="&doNotTrackInfo.label;"/>
        <spacer flex="1"/>
      </hbox>
    </groupbox>

  </prefpane>
</overlay>
