Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 5172009: This adds some plumbing for propagating the reason for a renderer's death (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload after sync for proper diffs Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 // Extensions hosted in ExternalTabContainer objects may not have 770 // Extensions hosted in ExternalTabContainer objects may not have
769 // an associated browser. 771 // an associated browser.
770 Browser* browser = GetBrowser(); 772 Browser* browser = GetBrowser();
771 if (browser) 773 if (browser)
772 window_id = ExtensionTabUtil::GetWindowId(browser); 774 window_id = ExtensionTabUtil::GetWindowId(browser);
773 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { 775 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) {
774 NOTREACHED(); 776 NOTREACHED();
775 } 777 }
776 return window_id; 778 return window_id;
777 } 779 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698