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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 2835020: plugins: Add crash icon into the plugin crash alert infobar. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 // For GdkScreen 8 // For GdkScreen
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 #endif // defined(OS_CHROMEOS) 10 #endif // defined(OS_CHROMEOS)
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 // terrible, so look for that and strip it off if present. 1941 // terrible, so look for that and strip it off if present.
1942 const std::wstring plugin_extension(L".plugin"); 1942 const std::wstring plugin_extension(L".plugin");
1943 if (EndsWith(plugin_name, plugin_extension, true)) 1943 if (EndsWith(plugin_name, plugin_extension, true))
1944 plugin_name.erase(plugin_name.length() - plugin_extension.length()); 1944 plugin_name.erase(plugin_name.length() - plugin_extension.length());
1945 #endif // OS_MACOSX 1945 #endif // OS_MACOSX
1946 } 1946 }
1947 } 1947 }
1948 #else 1948 #else
1949 NOTIMPLEMENTED() << " convert plugin path to plugin name"; 1949 NOTIMPLEMENTED() << " convert plugin path to plugin name";
1950 #endif 1950 #endif
1951 SkBitmap* crash_icon = ResourceBundle::GetSharedInstance().GetBitmapNamed(
1952 IDR_INFOBAR_PLUGIN_CRASHED);
1951 AddInfoBar(new SimpleAlertInfoBarDelegate( 1953 AddInfoBar(new SimpleAlertInfoBarDelegate(
1952 this, l10n_util::GetStringF(IDS_PLUGIN_CRASHED_PROMPT, plugin_name), 1954 this, l10n_util::GetStringF(IDS_PLUGIN_CRASHED_PROMPT, plugin_name),
1953 NULL, true)); 1955 crash_icon, true));
1954 } 1956 }
1955 1957
1956 void TabContents::OnCrashedWorker() { 1958 void TabContents::OnCrashedWorker() {
1957 AddInfoBar(new SimpleAlertInfoBarDelegate( 1959 AddInfoBar(new SimpleAlertInfoBarDelegate(
1958 this, l10n_util::GetString(IDS_WEBWORKER_CRASHED_PROMPT), 1960 this, l10n_util::GetString(IDS_WEBWORKER_CRASHED_PROMPT),
1959 NULL, true)); 1961 NULL, true));
1960 } 1962 }
1961 1963
1962 void TabContents::OnDidGetApplicationInfo( 1964 void TabContents::OnDidGetApplicationInfo(
1963 int32 page_id, 1965 int32 page_id,
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3175 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); 3177 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save));
3176 } 3178 }
3177 3179
3178 Profile* TabContents::GetProfileForPasswordManager() { 3180 Profile* TabContents::GetProfileForPasswordManager() {
3179 return profile(); 3181 return profile();
3180 } 3182 }
3181 3183
3182 bool TabContents::DidLastPageLoadEncounterSSLErrors() { 3184 bool TabContents::DidLastPageLoadEncounterSSLErrors() {
3183 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); 3185 return controller().ssl_manager()->ProcessedSSLErrorFromRequest();
3184 } 3186 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698