Remove (already-hidden) global fullscreen / mouselock settings.

This UI was already hidden. This just removes the HTML code for those
radio buttons, as well as the unused code for showing these buttons, and
the strings.

BUG=610900
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2045163002
Cr-Commit-Position: refs/heads/master@{#398757}
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index f427cb9..39c5f44 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -8152,15 +8152,6 @@
       <message name="IDS_MOUSE_LOCK_HEADER" desc="Label for Mouse Lock exception management page on Content Settings dialog">
         Mouse cursor exceptions
       </message>
-      <message name="IDS_MOUSE_LOCK_ALLOW_RADIO" desc="A radio button in the Content Settings dialog for allowing all sites ability to disable the mouse cursor.">
-        Allow all sites to disable the mouse cursor
-      </message>
-      <message name="IDS_MOUSE_LOCK_ASK_RADIO" desc="A radio button in the Content Settings dialog for asking before allowing sites to disable the mouse cursor.">
-        Ask when a site tries to disable the mouse cursor (recommended)
-      </message>
-      <message name="IDS_MOUSE_LOCK_BLOCK_RADIO" desc="A radio button in the Content Settings dialog for blocking all sites ability to disable the mouse cursor.">
-        Do not allow any site to disable the mouse cursor
-      </message>
       <if expr="chromeos or is_win">
         <message name="IDS_PROTECTED_CONTENT_TAB_LABEL" desc="Label for the Protected Content tab on the Content Settings dialog.">
           Protected content
diff --git a/chrome/browser/resources/options/content_settings.html b/chrome/browser/resources/options/content_settings.html
index e7b2dfb..85659d6 100644
--- a/chrome/browser/resources/options/content_settings.html
+++ b/chrome/browser/resources/options/content_settings.html
@@ -629,50 +629,22 @@
       </div>
     </section>
     <!-- Fullscreen filter -->
+    <!-- TODO(mgiuca): Delete this once per-site data deleted.
+         https://crbug.com/591896 -->
     <section id="fullscreen-section">
       <h3 i18n-content="fullscreenTabLabel"></h3>
-      <p id="fullscreen-deprecated" i18n-content="fullscreenDeprecated"></p>
+      <p i18n-content="fullscreenDeprecated"></p>
       <div class="settings-row">
         <button class="exceptions-list-button" contentType="fullscreen"
             i18n-content="manageExceptions"></button>
       </div>
     </section>
     <!-- Mouse Lock filter -->
+    <!-- TODO(mgiuca): Delete this once per-site data deleted.
+         https://crbug.com/591896 -->
     <section id="mouselock-section">
       <h3 i18n-content="mouselockTabLabel"></h3>
-      <p id="mouselock-deprecated" i18n-content="mouselockDeprecated"></p>
-      <div id="mouselock-global-settings">
-        <div class="radio">
-          <label>
-            <input type="radio" name="mouselock" value="allow">
-            <span>
-              <span i18n-content="mouselockAllow"></span>
-              <span class="controlled-setting-indicator"
-                  content-setting="mouselock" value="allow"></span>
-            </span>
-          </label>
-        </div>
-        <div class="radio">
-          <label>
-            <input type="radio" name="mouselock" value="ask">
-            <span>
-              <span i18n-content="mouselockAsk"></span>
-              <span class="controlled-setting-indicator"
-                  content-setting="mouselock" value="ask"></span>
-            </span>
-          </label>
-        </div>
-        <div class="radio">
-          <label>
-            <input type="radio" name="mouselock" value="block">
-            <span>
-              <span i18n-content="mouselockBlock"></span>
-              <span class="controlled-setting-indicator"
-                  content-setting="mouselock" value="block"></span>
-            </span>
-          </label>
-        </div>
-      </div>
+      <p i18n-content="mouselockDeprecated"></p>
       <div>
         <div class="settings-row">
           <button class="exceptions-list-button" contentType="mouselock"
diff --git a/chrome/browser/resources/options/content_settings.js b/chrome/browser/resources/options/content_settings.js
index 598a3db..edcadafe 100644
--- a/chrome/browser/resources/options/content_settings.js
+++ b/chrome/browser/resources/options/content_settings.js
@@ -206,19 +206,6 @@
   };
 
   /**
-   * Shows/hides parts of the fullscreen and mouselock sections.
-   * @param {boolean} deprecationVisible Whether to show (or hide) the
-   *    deprecation warning labels.
-   * @param {boolean} globalsVisible Whether to show (or hide) global settings.
-   */
-  ContentSettings.setExclusiveAccessVisible = function(
-      deprecationVisible, globalsVisible) {
-    $('fullscreen-deprecated').hidden = !deprecationVisible;
-    $('mouselock-deprecated').hidden = !deprecationVisible;
-    $('mouselock-global-settings').hidden = !globalsVisible;
-  };
-
-  /**
    * Updates the microphone/camera devices menu with the given entries.
    * @param {string} type The device type.
    * @param {Array} devices List of available devices.
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 0bdb4c4..fafee9bd 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -506,9 +506,6 @@
     {"mouselockTabLabel", IDS_MOUSE_LOCK_TAB_LABEL},
     {"mouselockHeader", IDS_MOUSE_LOCK_HEADER},
     {"mouselockDeprecated", IDS_EXCLUSIVE_ACCESS_DEPRECATED},
-    {"mouselockAllow", IDS_MOUSE_LOCK_ALLOW_RADIO},
-    {"mouselockAsk", IDS_MOUSE_LOCK_ASK_RADIO},
-    {"mouselockBlock", IDS_MOUSE_LOCK_BLOCK_RADIO},
 #if defined(OS_CHROMEOS) || defined(OS_WIN)
     // Protected Content filter
     {"protectedContentTabLabel", IDS_PROTECTED_CONTENT_TAB_LABEL},
@@ -714,16 +711,6 @@
   UpdateAllExceptionsViewsFromModel();
   UpdateAllChooserExceptionsViewsFromModel();
   UpdateProtectedContentExceptionsButton();
-
-  // Fullscreen and mouselock settings are ignored, but still stored. Always
-  // show the per-site settings (to give users the ability to view and delete
-  // exceptions), but hide the global settings.
-  // TODO(mgiuca): Remove this function and the global setting UI
-  // (https://crbug.com/610900). Then, delete all the per-site data and remove
-  // this content setting entirely (https://crbug.com/591896).
-  web_ui()->CallJavascriptFunctionUnsafe(
-      "ContentSettings.setExclusiveAccessVisible", base::FundamentalValue(true),
-      base::FundamentalValue(false));
 }
 
 void ContentSettingsHandler::OnContentSettingChanged(
@@ -1174,10 +1161,13 @@
 
   UpdateExceptionsViewFromOTRHostContentSettingsMap(type);
 
-  // TODO(koz): The default for fullscreen is always 'ask'.
-  // http://crbug.com/104683
-  if (type == CONTENT_SETTINGS_TYPE_FULLSCREEN)
+  // Fullscreen and mouse lock have no global settings to update.
+  // TODO(mgiuca): Delete this after removing these content settings entirely
+  // (https://crbug.com/591896).
+  if (type == CONTENT_SETTINGS_TYPE_FULLSCREEN ||
+      type == CONTENT_SETTINGS_TYPE_MOUSELOCK) {
     return;
+  }
 
 #if defined(OS_CHROMEOS)
   // Also the default for protected contents is managed in another place.