Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 12316077: Move the parsing of app.launch related keys out of Extension class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 #include "chrome/browser/extensions/extension_service.h" 21 #include "chrome/browser/extensions/extension_service.h"
22 #include "chrome/browser/extensions/extension_special_storage_policy.h" 22 #include "chrome/browser/extensions/extension_special_storage_policy.h"
23 #include "chrome/browser/notifications/desktop_notification_service.h" 23 #include "chrome/browser/notifications/desktop_notification_service.h"
24 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 24 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
25 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/browser/ui/browser_list.h" 26 #include "chrome/browser/ui/browser_list.h"
27 #include "chrome/common/chrome_notification_types.h" 27 #include "chrome/common/chrome_notification_types.h"
28 #include "chrome/common/chrome_switches.h" 28 #include "chrome/common/chrome_switches.h"
29 #include "chrome/common/content_settings.h" 29 #include "chrome/common/content_settings.h"
30 #include "chrome/common/content_settings_pattern.h" 30 #include "chrome/common/content_settings_pattern.h"
31 #include "chrome/common/extensions/app_launcher_info.h"
31 #include "chrome/common/extensions/extension_set.h" 32 #include "chrome/common/extensions/extension_set.h"
32 #include "chrome/common/extensions/permissions/api_permission.h" 33 #include "chrome/common/extensions/permissions/api_permission.h"
33 #include "chrome/common/pref_names.h" 34 #include "chrome/common/pref_names.h"
34 #include "chrome/common/url_constants.h" 35 #include "chrome/common/url_constants.h"
35 #include "content/public/browser/notification_service.h" 36 #include "content/public/browser/notification_service.h"
36 #include "content/public/browser/notification_source.h" 37 #include "content/public/browser/notification_source.h"
37 #include "content/public/browser/notification_types.h" 38 #include "content/public/browser/notification_types.h"
38 #include "content/public/browser/user_metrics.h" 39 #include "content/public/browser/user_metrics.h"
39 #include "content/public/browser/web_ui.h" 40 #include "content/public/browser/web_ui.h"
40 #include "content/public/common/content_switches.h" 41 #include "content/public/common/content_switches.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 if (!app_filter(**extension, profile)) continue; 222 if (!app_filter(**extension, profile)) continue;
222 223
223 extensions::URLPatternSet web_extent = (*extension)->web_extent(); 224 extensions::URLPatternSet web_extent = (*extension)->web_extent();
224 // Add patterns from web extent. 225 // Add patterns from web extent.
225 for (extensions::URLPatternSet::const_iterator pattern = web_extent.begin(); 226 for (extensions::URLPatternSet::const_iterator pattern = web_extent.begin();
226 pattern != web_extent.end(); ++pattern) { 227 pattern != web_extent.end(); ++pattern) {
227 std::string url_pattern = pattern->GetAsString(); 228 std::string url_pattern = pattern->GetAsString();
228 AddExceptionForHostedApp(url_pattern, **extension, exceptions); 229 AddExceptionForHostedApp(url_pattern, **extension, exceptions);
229 } 230 }
230 // Retrieve the launch URL. 231 // Retrieve the launch URL.
231 std::string launch_url_string = (*extension)->launch_web_url(); 232 std::string launch_url_string =
233 extensions::AppLauncherInfo::GetLaunchWebURL(*extension);
232 GURL launch_url(launch_url_string); 234 GURL launch_url(launch_url_string);
233 // Skip adding the launch URL if it is part of the web extent. 235 // Skip adding the launch URL if it is part of the web extent.
234 if (web_extent.MatchesURL(launch_url)) continue; 236 if (web_extent.MatchesURL(launch_url)) continue;
235 AddExceptionForHostedApp(launch_url_string, **extension, exceptions); 237 AddExceptionForHostedApp(launch_url_string, **extension, exceptions);
236 } 238 }
237 } 239 }
238 240
239 } // namespace 241 } // namespace
240 242
241 namespace options { 243 namespace options {
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 media_settings_.flash_default_setting, 1386 media_settings_.flash_default_setting,
1385 media_settings_.flash_exceptions, 1387 media_settings_.flash_exceptions,
1386 media_settings_.policy_disable_audio, 1388 media_settings_.policy_disable_audio,
1387 media_settings_.policy_disable_video)) { 1389 media_settings_.policy_disable_video)) {
1388 ShowFlashMediaLink(EXCEPTIONS, true); 1390 ShowFlashMediaLink(EXCEPTIONS, true);
1389 } 1391 }
1390 } 1392 }
1391 } 1393 }
1392 1394
1393 } // namespace options 1395 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698