| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 CrashNotificationDelegate(Profile* profile, | 99 CrashNotificationDelegate(Profile* profile, |
| 100 const Extension* extension) | 100 const Extension* extension) |
| 101 : profile_(profile), | 101 : profile_(profile), |
| 102 is_hosted_app_(extension->is_hosted_app()), | 102 is_hosted_app_(extension->is_hosted_app()), |
| 103 is_platform_app_(extension->is_platform_app()), | 103 is_platform_app_(extension->is_platform_app()), |
| 104 extension_id_(extension->id()) { | 104 extension_id_(extension->id()) { |
| 105 } | 105 } |
| 106 | 106 |
| 107 void Display() override {} | 107 void Display() override {} |
| 108 | 108 |
| 109 void Error() override {} | |
| 110 | |
| 111 void Close(bool by_user) override {} | 109 void Close(bool by_user) override {} |
| 112 | 110 |
| 113 void Click() override { | 111 void Click() override { |
| 114 // http://crbug.com/247790 involves a crash notification balloon being | 112 // http://crbug.com/247790 involves a crash notification balloon being |
| 115 // clicked while the extension isn't in the TERMINATED state. In that case, | 113 // clicked while the extension isn't in the TERMINATED state. In that case, |
| 116 // any of the "reload" methods called below can unload the extension, which | 114 // any of the "reload" methods called below can unload the extension, which |
| 117 // indirectly destroys *this, invalidating all the member variables, so we | 115 // indirectly destroys *this, invalidating all the member variables, so we |
| 118 // copy the extension ID before using it. | 116 // copy the extension ID before using it. |
| 119 std::string copied_extension_id = extension_id_; | 117 std::string copied_extension_id = extension_id_; |
| 120 if (is_hosted_app_) { | 118 if (is_hosted_app_) { |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 bool user_gesture, | 774 bool user_gesture, |
| 777 bool* was_blocked) { | 775 bool* was_blocked) { |
| 778 Browser* browser = chrome::FindLastActiveWithProfile( | 776 Browser* browser = chrome::FindLastActiveWithProfile( |
| 779 Profile::FromBrowserContext(new_contents->GetBrowserContext()), | 777 Profile::FromBrowserContext(new_contents->GetBrowserContext()), |
| 780 chrome::GetActiveDesktop()); | 778 chrome::GetActiveDesktop()); |
| 781 if (browser) { | 779 if (browser) { |
| 782 chrome::AddWebContents(browser, NULL, new_contents, disposition, | 780 chrome::AddWebContents(browser, NULL, new_contents, disposition, |
| 783 initial_pos, user_gesture, was_blocked); | 781 initial_pos, user_gesture, was_blocked); |
| 784 } | 782 } |
| 785 } | 783 } |
| OLD | NEW |