| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 NOTREACHED(); | 342 NOTREACHED(); |
| 343 ShutdownAssociatedBackgroundContents( | 343 ShutdownAssociatedBackgroundContents( |
| 344 ASCIIToUTF16(content::Details<UnloadedExtensionInfo>(details)-> | 344 ASCIIToUTF16(content::Details<UnloadedExtensionInfo>(details)-> |
| 345 extension->id())); | 345 extension->id())); |
| 346 break; | 346 break; |
| 347 } | 347 } |
| 348 break; | 348 break; |
| 349 | 349 |
| 350 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: { | 350 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: { |
| 351 // Remove any "This extension has crashed" balloons. | 351 // Remove any "This extension has crashed" balloons. |
| 352 ScheduleCloseBalloon(*content::Details<const std::string>(details).ptr()); | 352 ScheduleCloseBalloon( |
| 353 content::Details<const Extension>(details).ptr()->id()); |
| 353 break; | 354 break; |
| 354 } | 355 } |
| 355 | 356 |
| 356 default: | 357 default: |
| 357 NOTREACHED(); | 358 NOTREACHED(); |
| 358 break; | 359 break; |
| 359 } | 360 } |
| 360 } | 361 } |
| 361 | 362 |
| 362 // Loads all background contents whose urls have been stored in prefs. | 363 // Loads all background contents whose urls have been stored in prefs. |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 WindowOpenDisposition disposition, | 613 WindowOpenDisposition disposition, |
| 613 const gfx::Rect& initial_pos, | 614 const gfx::Rect& initial_pos, |
| 614 bool user_gesture) { | 615 bool user_gesture) { |
| 615 Browser* browser = browser::FindLastActiveWithProfile( | 616 Browser* browser = browser::FindLastActiveWithProfile( |
| 616 Profile::FromBrowserContext(new_contents->GetBrowserContext())); | 617 Profile::FromBrowserContext(new_contents->GetBrowserContext())); |
| 617 if (browser) { | 618 if (browser) { |
| 618 chrome::AddWebContents(browser, NULL, new_contents, disposition, | 619 chrome::AddWebContents(browser, NULL, new_contents, disposition, |
| 619 initial_pos, user_gesture); | 620 initial_pos, user_gesture); |
| 620 } | 621 } |
| 621 } | 622 } |
| OLD | NEW |