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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |