| 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/ui/webui/options/content_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/browser/extensions/extension_service.h" | 22 #include "chrome/browser/extensions/extension_service.h" |
| 23 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 23 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 24 #include "chrome/browser/notifications/desktop_notification_service.h" | 24 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 25 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 25 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 26 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
| 27 #include "chrome/browser/ui/browser_list.h" | 27 #include "chrome/browser/ui/browser_list.h" |
| 28 #include "chrome/common/chrome_notification_types.h" | 28 #include "chrome/common/chrome_notification_types.h" |
| 29 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
| 30 #include "chrome/common/content_settings.h" | 30 #include "chrome/common/content_settings.h" |
| 31 #include "chrome/common/content_settings_pattern.h" | 31 #include "chrome/common/content_settings_pattern.h" |
| 32 #include "chrome/common/extensions/app_launcher_info.h" |
| 32 #include "chrome/common/extensions/extension_set.h" | 33 #include "chrome/common/extensions/extension_set.h" |
| 33 #include "chrome/common/extensions/permissions/api_permission.h" | 34 #include "chrome/common/extensions/permissions/api_permission.h" |
| 34 #include "chrome/common/pref_names.h" | 35 #include "chrome/common/pref_names.h" |
| 35 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
| 36 #include "content/public/browser/notification_service.h" | 37 #include "content/public/browser/notification_service.h" |
| 37 #include "content/public/browser/notification_source.h" | 38 #include "content/public/browser/notification_source.h" |
| 38 #include "content/public/browser/notification_types.h" | 39 #include "content/public/browser/notification_types.h" |
| 39 #include "content/public/browser/user_metrics.h" | 40 #include "content/public/browser/user_metrics.h" |
| 40 #include "content/public/browser/web_ui.h" | 41 #include "content/public/browser/web_ui.h" |
| 41 #include "content/public/common/content_switches.h" | 42 #include "content/public/common/content_switches.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 if (!app_filter(**extension, profile)) continue; | 224 if (!app_filter(**extension, profile)) continue; |
| 224 | 225 |
| 225 extensions::URLPatternSet web_extent = (*extension)->web_extent(); | 226 extensions::URLPatternSet web_extent = (*extension)->web_extent(); |
| 226 // Add patterns from web extent. | 227 // Add patterns from web extent. |
| 227 for (extensions::URLPatternSet::const_iterator pattern = web_extent.begin(); | 228 for (extensions::URLPatternSet::const_iterator pattern = web_extent.begin(); |
| 228 pattern != web_extent.end(); ++pattern) { | 229 pattern != web_extent.end(); ++pattern) { |
| 229 std::string url_pattern = pattern->GetAsString(); | 230 std::string url_pattern = pattern->GetAsString(); |
| 230 AddExceptionForHostedApp(url_pattern, **extension, exceptions); | 231 AddExceptionForHostedApp(url_pattern, **extension, exceptions); |
| 231 } | 232 } |
| 232 // Retrieve the launch URL. | 233 // Retrieve the launch URL. |
| 233 std::string launch_url_string = (*extension)->launch_web_url(); | 234 std::string launch_url_string = |
| 235 extensions::AppLauncherInfo::GetLaunchWebURL(*extension); |
| 234 GURL launch_url(launch_url_string); | 236 GURL launch_url(launch_url_string); |
| 235 // Skip adding the launch URL if it is part of the web extent. | 237 // Skip adding the launch URL if it is part of the web extent. |
| 236 if (web_extent.MatchesURL(launch_url)) continue; | 238 if (web_extent.MatchesURL(launch_url)) continue; |
| 237 AddExceptionForHostedApp(launch_url_string, **extension, exceptions); | 239 AddExceptionForHostedApp(launch_url_string, **extension, exceptions); |
| 238 } | 240 } |
| 239 } | 241 } |
| 240 | 242 |
| 241 } // namespace | 243 } // namespace |
| 242 | 244 |
| 243 namespace options { | 245 namespace options { |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 media_settings_.flash_default_setting, | 1388 media_settings_.flash_default_setting, |
| 1387 media_settings_.flash_exceptions, | 1389 media_settings_.flash_exceptions, |
| 1388 media_settings_.policy_disable_audio, | 1390 media_settings_.policy_disable_audio, |
| 1389 media_settings_.policy_disable_video)) { | 1391 media_settings_.policy_disable_video)) { |
| 1390 ShowFlashMediaLink(EXCEPTIONS, true); | 1392 ShowFlashMediaLink(EXCEPTIONS, true); |
| 1391 } | 1393 } |
| 1392 } | 1394 } |
| 1393 } | 1395 } |
| 1394 | 1396 |
| 1395 } // namespace options | 1397 } // namespace options |
| OLD | NEW |