OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extensions/extension_host.h" | 5 #include "chrome/browser/extensions/extension_host.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "app/keyboard_codes.h" | 9 #include "app/keyboard_codes.h" |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 277 |
278 void ExtensionHost::UpdateInspectorSetting(const std::string& key, | 278 void ExtensionHost::UpdateInspectorSetting(const std::string& key, |
279 const std::string& value) { | 279 const std::string& value) { |
280 RenderViewHostDelegateHelper::UpdateInspectorSetting(profile(), key, value); | 280 RenderViewHostDelegateHelper::UpdateInspectorSetting(profile(), key, value); |
281 } | 281 } |
282 | 282 |
283 void ExtensionHost::ClearInspectorSettings() { | 283 void ExtensionHost::ClearInspectorSettings() { |
284 RenderViewHostDelegateHelper::ClearInspectorSettings(profile()); | 284 RenderViewHostDelegateHelper::ClearInspectorSettings(profile()); |
285 } | 285 } |
286 | 286 |
287 void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host) { | 287 void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host, |
| 288 base::TerminationStatus status, |
| 289 int error_code) { |
288 // During browser shutdown, we may use sudden termination on an extension | 290 // During browser shutdown, we may use sudden termination on an extension |
289 // process, so it is expected to lose our connection to the render view. | 291 // process, so it is expected to lose our connection to the render view. |
290 // Do nothing. | 292 // Do nothing. |
291 if (browser_shutdown::GetShutdownType() != browser_shutdown::NOT_VALID) | 293 if (browser_shutdown::GetShutdownType() != browser_shutdown::NOT_VALID) |
292 return; | 294 return; |
293 | 295 |
294 // In certain cases, multiple ExtensionHost objects may have pointed to | 296 // In certain cases, multiple ExtensionHost objects may have pointed to |
295 // the same Extension at some point (one with a background page and a | 297 // the same Extension at some point (one with a background page and a |
296 // popup, for example). When the first ExtensionHost goes away, the extension | 298 // popup, for example). When the first ExtensionHost goes away, the extension |
297 // is unloaded, and any other host that pointed to that extension will have | 299 // is unloaded, and any other host that pointed to that extension will have |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 // Extensions hosted in ExternalTabContainer objects may not have | 778 // Extensions hosted in ExternalTabContainer objects may not have |
777 // an associated browser. | 779 // an associated browser. |
778 Browser* browser = GetBrowser(); | 780 Browser* browser = GetBrowser(); |
779 if (browser) | 781 if (browser) |
780 window_id = ExtensionTabUtil::GetWindowId(browser); | 782 window_id = ExtensionTabUtil::GetWindowId(browser); |
781 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { | 783 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { |
782 NOTREACHED(); | 784 NOTREACHED(); |
783 } | 785 } |
784 return window_id; | 786 return window_id; |
785 } | 787 } |
OLD | NEW |