| 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 "base/basictypes.h" | 7 #include "base/basictypes.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/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/common/chrome_notification_types.h" | 26 #include "chrome/common/chrome_notification_types.h" |
| 27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
| 28 #include "chrome/common/extensions/extension.h" | 28 #include "chrome/common/extensions/extension.h" |
| 29 #include "chrome/common/extensions/extension_icon_set.h" | 29 #include "chrome/common/extensions/extension_icon_set.h" |
| 30 #include "chrome/common/extensions/extension_constants.h" | 30 #include "chrome/common/extensions/extension_constants.h" |
| 31 #include "chrome/common/pref_names.h" | 31 #include "chrome/common/pref_names.h" |
| 32 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
| 33 #include "content/public/browser/site_instance.h" | 33 #include "content/public/browser/site_instance.h" |
| 34 #include "content/public/browser/web_contents.h" | 34 #include "content/public/browser/web_contents.h" |
| 35 #include "grit/generated_resources.h" | 35 #include "grit/generated_resources.h" |
| 36 #include "ipc/ipc_message.h" |
| 36 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 37 | 38 |
| 38 using content::SiteInstance; | 39 using content::SiteInstance; |
| 39 using content::WebContents; | 40 using content::WebContents; |
| 40 using extensions::Extension; | 41 using extensions::Extension; |
| 41 using extensions::UnloadedExtensionInfo; | 42 using extensions::UnloadedExtensionInfo; |
| 42 | 43 |
| 43 namespace { | 44 namespace { |
| 44 | 45 |
| 45 const char kNotificationPrefix[] = "app.background.crashed."; | 46 const char kNotificationPrefix[] = "app.background.crashed."; |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 WebContents* new_contents, | 610 WebContents* new_contents, |
| 610 WindowOpenDisposition disposition, | 611 WindowOpenDisposition disposition, |
| 611 const gfx::Rect& initial_pos, | 612 const gfx::Rect& initial_pos, |
| 612 bool user_gesture) { | 613 bool user_gesture) { |
| 613 Browser* browser = browser::FindLastActiveWithProfile( | 614 Browser* browser = browser::FindLastActiveWithProfile( |
| 614 Profile::FromBrowserContext(new_contents->GetBrowserContext())); | 615 Profile::FromBrowserContext(new_contents->GetBrowserContext())); |
| 615 if (!browser) | 616 if (!browser) |
| 616 return; | 617 return; |
| 617 browser->AddWebContents(new_contents, disposition, initial_pos, user_gesture); | 618 browser->AddWebContents(new_contents, disposition, initial_pos, user_gesture); |
| 618 } | 619 } |
| OLD | NEW |