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

Unified Diff: chrome/browser/ui/browser.cc

Issue 6537015: Start moving core pieces of Chrome multi-process code to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/cocoa/hung_renderer_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
===================================================================
--- chrome/browser/ui/browser.cc (revision 75368)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -102,6 +102,7 @@
#include "chrome/common/profiling.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/web_apps.h"
+#include "content/browser/tab_contents/infobar_delegate.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -825,7 +826,7 @@
FormatTitleForDisplay(&title);
}
if (title.empty())
- title = TabContents::GetDefaultTitle();
+ title = TabContentsWrapper::GetDefaultTitle();
#if defined(OS_MACOSX) || defined(OS_CHROMEOS)
// On Mac or ChromeOS, we don't want to suffix the page title with
@@ -2746,7 +2747,7 @@
status_bubble->Hide();
// Show the loading state (if any).
- status_bubble->SetStatus(GetSelectedTabContents()->GetStatusText());
+ status_bubble->SetStatus(GetSelectedTabContentsWrapper()->GetStatusText());
}
if (HasFindBarController()) {
@@ -2917,7 +2918,8 @@
if (source == selected_contents) {
UpdateReloadStopState(source->is_loading(), false);
if (GetStatusBubble()) {
- GetStatusBubble()->SetStatus(GetSelectedTabContents()->GetStatusText());
+ GetStatusBubble()->SetStatus(
+ GetSelectedTabContentsWrapper()->GetStatusText());
}
if (!source->is_loading() &&
@@ -3267,6 +3269,14 @@
UpdateCommandsForContentRestrictionState();
}
+void Browser::WorkerCrashed() {
+ TabContents* tab_contents = GetSelectedTabContents();
+ if (!tab_contents)
+ return;
+ tab_contents->AddInfoBar(new SimpleAlertInfoBarDelegate(tab_contents, NULL,
+ l10n_util::GetStringUTF16(IDS_WEBWORKER_CRASHED_PROMPT), true));
+}
+
///////////////////////////////////////////////////////////////////////////////
// Browser, TabContentsWrapperDelegate implementation:
@@ -3884,8 +3894,10 @@
window()->GetLocationBar()->UpdatePageActions();
// Updating the URL happens synchronously in ScheduleUIUpdate.
- if (flags & TabContents::INVALIDATE_LOAD && GetStatusBubble())
- GetStatusBubble()->SetStatus(contents->GetStatusText());
+ if (flags & TabContents::INVALIDATE_LOAD && GetStatusBubble()) {
+ GetStatusBubble()->SetStatus(
+ GetSelectedTabContentsWrapper()->GetStatusText());
+ }
if (flags & (TabContents::INVALIDATE_TAB |
TabContents::INVALIDATE_TITLE)) {
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/cocoa/hung_renderer_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698