OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/content_settings/host_content_settings_map.h" | 5 #include "chrome/browser/content_settings/host_content_settings_map.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 return IsSettingAllowedForType( | 318 return IsSettingAllowedForType( |
319 content_settings::ValueToContentSetting(value), type); | 319 content_settings::ValueToContentSetting(value), type); |
320 } | 320 } |
321 | 321 |
322 // static | 322 // static |
323 bool HostContentSettingsMap::IsSettingAllowedForType( | 323 bool HostContentSettingsMap::IsSettingAllowedForType( |
324 ContentSetting setting, ContentSettingsType content_type) { | 324 ContentSetting setting, ContentSettingsType content_type) { |
325 // Intents content settings are hidden behind a switch for now. | 325 // Intents content settings are hidden behind a switch for now. |
326 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS) { | 326 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS) { |
327 #if defined(ENABLE_WEB_INTENTS) | 327 #if defined(ENABLE_WEB_INTENTS) |
328 if (!web_intents::IsWebIntentsEnabled()) | 328 if (!web_intents::IsWebIntentsEnabledInActiveBrowser()) |
329 return false; | 329 return false; |
330 #else | 330 #else |
331 return false; | 331 return false; |
332 #endif | 332 #endif |
333 } | 333 } |
334 | 334 |
335 // BLOCK semantics are not implemented for fullscreen. | 335 // BLOCK semantics are not implemented for fullscreen. |
336 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN && | 336 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN && |
337 setting == CONTENT_SETTING_BLOCK) { | 337 setting == CONTENT_SETTING_BLOCK) { |
338 return false; | 338 return false; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 } | 471 } |
472 } | 472 } |
473 | 473 |
474 if (info) { | 474 if (info) { |
475 info->source = content_settings::SETTING_SOURCE_NONE; | 475 info->source = content_settings::SETTING_SOURCE_NONE; |
476 info->primary_pattern = ContentSettingsPattern(); | 476 info->primary_pattern = ContentSettingsPattern(); |
477 info->secondary_pattern = ContentSettingsPattern(); | 477 info->secondary_pattern = ContentSettingsPattern(); |
478 } | 478 } |
479 return NULL; | 479 return NULL; |
480 } | 480 } |
OLD | NEW |