diff options
author | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-22 00:41:17 +0000 |
---|---|---|
committer | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-22 00:41:17 +0000 |
commit | fc9bf18faf17def62fc122dd5df7bbf57c7ea0ce (patch) | |
tree | 72db1d24cf851beb0616d4dfb97d399701ed8133 /chrome/browser/content_settings | |
parent | d34dbf2e0870d82bb70490f8d0a4e70046a7d15e (diff) | |
download | chromium_src-fc9bf18faf17def62fc122dd5df7bbf57c7ea0ce.zip chromium_src-fc9bf18faf17def62fc122dd5df7bbf57c7ea0ce.tar.gz chromium_src-fc9bf18faf17def62fc122dd5df7bbf57c7ea0ce.tar.bz2 |
Mouse lock content setting back-end (no UI)
BUG=100677
TEST=Manual test in ppapi/examples/mouse_lock; enter full screen and mouse lock; prompts should appear only first time.
R=jochen@chromium.org, pkasting@chromium.org, yzshen@chromium.org
Review URL: http://codereview.chromium.org/8354026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106821 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_settings')
3 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/content_settings/content_settings_default_provider.cc b/chrome/browser/content_settings/content_settings_default_provider.cc index 4964c9e..48d2d45 100644 --- a/chrome/browser/content_settings/content_settings_default_provider.cc +++ b/chrome/browser/content_settings/content_settings_default_provider.cc @@ -38,6 +38,7 @@ const ContentSetting kDefaultSettings[] = { CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_INTENTS CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_FULLSCREEN + CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_MOUSELOCK }; COMPILE_ASSERT(arraysize(kDefaultSettings) == CONTENT_SETTINGS_NUM_TYPES, default_settings_incorrect_size); diff --git a/chrome/browser/content_settings/content_settings_utils.cc b/chrome/browser/content_settings/content_settings_utils.cc index cdc8537c..2338507 100644 --- a/chrome/browser/content_settings/content_settings_utils.cc +++ b/chrome/browser/content_settings/content_settings_utils.cc @@ -31,7 +31,8 @@ const char* kTypeNames[] = { "notifications", "intents", "auto-select-certificate", - "fullscreen" + "fullscreen", + "mouselock" }; COMPILE_ASSERT(arraysize(kTypeNames) == CONTENT_SETTINGS_NUM_TYPES, type_names_incorrect_size); diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc index 06ab654..208b8ba 100644 --- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc +++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc @@ -159,6 +159,8 @@ TEST_F(HostContentSettingsMapTest, IndividualSettings) { CONTENT_SETTING_ASK; desired_settings.settings[CONTENT_SETTINGS_TYPE_FULLSCREEN] = CONTENT_SETTING_ASK; + desired_settings.settings[CONTENT_SETTINGS_TYPE_MOUSELOCK] = + CONTENT_SETTING_ASK; ContentSettings settings = host_content_settings_map->GetContentSettings(host, host); EXPECT_TRUE(SettingsEqual(desired_settings, settings)); @@ -618,6 +620,8 @@ TEST_F(HostContentSettingsMapTest, NestedSettings) { CONTENT_SETTING_ASK; desired_settings.settings[CONTENT_SETTINGS_TYPE_FULLSCREEN] = CONTENT_SETTING_ASK; + desired_settings.settings[CONTENT_SETTINGS_TYPE_MOUSELOCK] = + CONTENT_SETTING_ASK; ContentSettings settings = host_content_settings_map->GetContentSettings(host, host); EXPECT_TRUE(SettingsEqual(desired_settings, settings)); @@ -637,6 +641,8 @@ TEST_F(HostContentSettingsMapTest, NestedSettings) { settings.settings[CONTENT_SETTINGS_TYPE_INTENTS]); EXPECT_EQ(desired_settings.settings[CONTENT_SETTINGS_TYPE_FULLSCREEN], settings.settings[CONTENT_SETTINGS_TYPE_FULLSCREEN]); + EXPECT_EQ(desired_settings.settings[CONTENT_SETTINGS_TYPE_MOUSELOCK], + settings.settings[CONTENT_SETTINGS_TYPE_MOUSELOCK]); } TEST_F(HostContentSettingsMapTest, OffTheRecord) { |