OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 } | 1086 } |
1087 | 1087 |
1088 void BrowserView::ShowNewProfileDialog() { | 1088 void BrowserView::ShowNewProfileDialog() { |
1089 browser::ShowNewProfileDialog(); | 1089 browser::ShowNewProfileDialog(); |
1090 } | 1090 } |
1091 | 1091 |
1092 void BrowserView::ShowRepostFormWarningDialog(TabContents* tab_contents) { | 1092 void BrowserView::ShowRepostFormWarningDialog(TabContents* tab_contents) { |
1093 browser::ShowRepostFormWarningDialog(GetNativeHandle(), tab_contents); | 1093 browser::ShowRepostFormWarningDialog(GetNativeHandle(), tab_contents); |
1094 } | 1094 } |
1095 | 1095 |
1096 void BrowserView::ShowHistoryTooNewDialog() { | 1096 void BrowserView::ShowProfileErrorDialog(int message_id) { |
1097 #if defined(OS_WIN) | 1097 #if defined(OS_WIN) |
1098 std::wstring title = l10n_util::GetString(IDS_PRODUCT_NAME); | 1098 std::wstring title = l10n_util::GetString(IDS_PRODUCT_NAME); |
1099 std::wstring message = l10n_util::GetString(IDS_PROFILE_TOO_NEW_ERROR); | 1099 std::wstring message = l10n_util::GetString(message_id); |
1100 win_util::MessageBox(GetNativeHandle(), message, title, | 1100 win_util::MessageBox(GetNativeHandle(), message, title, |
1101 MB_OK | MB_ICONWARNING | MB_TOPMOST); | 1101 MB_OK | MB_ICONWARNING | MB_TOPMOST); |
1102 #elif defined(OS_LINUX) | 1102 #elif defined(OS_LINUX) |
1103 std::string title = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); | 1103 std::string title = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); |
1104 std::string message = l10n_util::GetStringUTF8(IDS_PROFILE_TOO_NEW_ERROR); | 1104 std::string message = l10n_util::GetStringUTF8(message_id); |
1105 GtkWidget* dialog = gtk_message_dialog_new(GetNativeHandle(), | 1105 GtkWidget* dialog = gtk_message_dialog_new(GetNativeHandle(), |
1106 static_cast<GtkDialogFlags>(0), GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, | 1106 static_cast<GtkDialogFlags>(0), GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, |
1107 "%s", message.c_str()); | 1107 "%s", message.c_str()); |
1108 gtk_window_set_title(GTK_WINDOW(dialog), title.c_str()); | 1108 gtk_window_set_title(GTK_WINDOW(dialog), title.c_str()); |
1109 g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); | 1109 g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); |
1110 gtk_widget_show_all(dialog); | 1110 gtk_widget_show_all(dialog); |
1111 #else | 1111 #else |
1112 NOTIMPLEMENTED(); | 1112 NOTIMPLEMENTED(); |
1113 #endif | 1113 #endif |
1114 } | 1114 } |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2257 | 2257 |
2258 // static | 2258 // static |
2259 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2259 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2260 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2260 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2261 } | 2261 } |
2262 | 2262 |
2263 // static | 2263 // static |
2264 void BrowserList::AllBrowsersClosed() { | 2264 void BrowserList::AllBrowsersClosed() { |
2265 views::Window::CloseAllSecondaryWindows(); | 2265 views::Window::CloseAllSecondaryWindows(); |
2266 } | 2266 } |
OLD | NEW |