| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 21 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
| 23 #include "chrome/browser/ui/browser.h" | 23 #include "chrome/browser/ui/browser.h" |
| 24 #include "chrome/browser/ui/browser_list.h" | 24 #include "chrome/browser/ui/browser_list.h" |
| 25 #include "chrome/common/chrome_notification_types.h" | 25 #include "chrome/common/chrome_notification_types.h" |
| 26 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
| 27 #include "chrome/common/extensions/extension.h" | 27 #include "chrome/common/extensions/extension.h" |
| 28 #include "chrome/common/extensions/extension_constants.h" | 28 #include "chrome/common/extensions/extension_constants.h" |
| 29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
| 30 #include "content/browser/site_instance.h" | 30 #include "content/browser/site_instance.h" |
| 31 #include "content/browser/tab_contents/tab_contents.h" | |
| 32 #include "content/public/browser/notification_service.h" | 31 #include "content/public/browser/notification_service.h" |
| 32 #include "content/public/browser/web_contents.h" |
| 33 #include "grit/generated_resources.h" | 33 #include "grit/generated_resources.h" |
| 34 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
| 35 | 35 |
| 36 using content::WebContents; | 36 using content::WebContents; |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 const char kNotificationPrefix[] = "app.background.crashed."; | 40 const char kNotificationPrefix[] = "app.background.crashed."; |
| 41 | 41 |
| 42 void CloseBalloon(const std::string id) { | 42 void CloseBalloon(const std::string id) { |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 WebContents* new_contents, | 572 WebContents* new_contents, |
| 573 WindowOpenDisposition disposition, | 573 WindowOpenDisposition disposition, |
| 574 const gfx::Rect& initial_pos, | 574 const gfx::Rect& initial_pos, |
| 575 bool user_gesture) { | 575 bool user_gesture) { |
| 576 Browser* browser = BrowserList::GetLastActiveWithProfile( | 576 Browser* browser = BrowserList::GetLastActiveWithProfile( |
| 577 Profile::FromBrowserContext(new_contents->GetBrowserContext())); | 577 Profile::FromBrowserContext(new_contents->GetBrowserContext())); |
| 578 if (!browser) | 578 if (!browser) |
| 579 return; | 579 return; |
| 580 browser->AddWebContents(new_contents, disposition, initial_pos, user_gesture); | 580 browser->AddWebContents(new_contents, disposition, initial_pos, user_gesture); |
| 581 } | 581 } |
| OLD | NEW |