| 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/background/background_contents_service.h" | 5 #include "chrome/browser/background/background_contents_service.h" |
| 6 | 6 |
| 7 #include "apps/app_load_service.h" | 7 #include "apps/app_load_service.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
| 15 #include "base/prefs/pref_service.h" | |
| 16 #include "base/prefs/scoped_user_pref_update.h" | |
| 17 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
| 18 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 20 #include "base/thread_task_runner_handle.h" | 18 #include "base/thread_task_runner_handle.h" |
| 21 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 22 #include "base/values.h" | 20 #include "base/values.h" |
| 23 #include "chrome/browser/background/background_contents_service_factory.h" | 21 #include "chrome/browser/background/background_contents_service_factory.h" |
| 24 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
| 25 #include "chrome/browser/chrome_notification_types.h" | 23 #include "chrome/browser/chrome_notification_types.h" |
| 26 #include "chrome/browser/extensions/extension_service.h" | 24 #include "chrome/browser/extensions/extension_service.h" |
| 27 #include "chrome/browser/notifications/notification.h" | 25 #include "chrome/browser/notifications/notification.h" |
| 28 #include "chrome/browser/notifications/notification_delegate.h" | 26 #include "chrome/browser/notifications/notification_delegate.h" |
| 29 #include "chrome/browser/notifications/notification_ui_manager.h" | 27 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 30 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
| 31 #include "chrome/browser/profiles/profile_manager.h" | 29 #include "chrome/browser/profiles/profile_manager.h" |
| 32 #include "chrome/browser/ui/browser.h" | 30 #include "chrome/browser/ui/browser.h" |
| 33 #include "chrome/browser/ui/browser_finder.h" | 31 #include "chrome/browser/ui/browser_finder.h" |
| 34 #include "chrome/browser/ui/browser_tabstrip.h" | 32 #include "chrome/browser/ui/browser_tabstrip.h" |
| 35 #include "chrome/browser/ui/host_desktop.h" | 33 #include "chrome/browser/ui/host_desktop.h" |
| 36 #include "chrome/common/extensions/extension_constants.h" | 34 #include "chrome/common/extensions/extension_constants.h" |
| 37 #include "chrome/common/pref_names.h" | 35 #include "chrome/common/pref_names.h" |
| 38 #include "chrome/grit/generated_resources.h" | 36 #include "chrome/grit/generated_resources.h" |
| 37 #include "components/prefs/pref_service.h" |
| 38 #include "components/prefs/scoped_user_pref_update.h" |
| 39 #include "content/public/browser/notification_service.h" | 39 #include "content/public/browser/notification_service.h" |
| 40 #include "content/public/browser/site_instance.h" | 40 #include "content/public/browser/site_instance.h" |
| 41 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
| 42 #include "extensions/browser/extension_host.h" | 42 #include "extensions/browser/extension_host.h" |
| 43 #include "extensions/browser/extension_registry.h" | 43 #include "extensions/browser/extension_registry.h" |
| 44 #include "extensions/browser/extension_system.h" | 44 #include "extensions/browser/extension_system.h" |
| 45 #include "extensions/browser/image_loader.h" | 45 #include "extensions/browser/image_loader.h" |
| 46 #include "extensions/browser/notification_types.h" | 46 #include "extensions/browser/notification_types.h" |
| 47 #include "extensions/common/constants.h" | 47 #include "extensions/common/constants.h" |
| 48 #include "extensions/common/extension.h" | 48 #include "extensions/common/extension.h" |
| (...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 bool user_gesture, | 784 bool user_gesture, |
| 785 bool* was_blocked) { | 785 bool* was_blocked) { |
| 786 Browser* browser = chrome::FindLastActiveWithProfile( | 786 Browser* browser = chrome::FindLastActiveWithProfile( |
| 787 Profile::FromBrowserContext(new_contents->GetBrowserContext()), | 787 Profile::FromBrowserContext(new_contents->GetBrowserContext()), |
| 788 chrome::GetActiveDesktop()); | 788 chrome::GetActiveDesktop()); |
| 789 if (browser) { | 789 if (browser) { |
| 790 chrome::AddWebContents(browser, NULL, new_contents, disposition, | 790 chrome::AddWebContents(browser, NULL, new_contents, disposition, |
| 791 initial_rect, user_gesture, was_blocked); | 791 initial_rect, user_gesture, was_blocked); |
| 792 } | 792 } |
| 793 } | 793 } |
| OLD | NEW |