| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Currently this file is only used for the uninstall prompt. The install prompt | 5 // Currently this file is only used for the uninstall prompt. The install prompt |
| 6 // code is in extension_install_prompt2_gtk.cc. | 6 // code is in extension_install_prompt2_gtk.cc. |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 BrowserWindow* browser_window = browser->window(); | 55 BrowserWindow* browser_window = browser->window(); |
| 56 if (!browser_window) { | 56 if (!browser_window) { |
| 57 delegate_->ExtensionUninstallCanceled(); | 57 delegate_->ExtensionUninstallCanceled(); |
| 58 return; | 58 return; |
| 59 } | 59 } |
| 60 | 60 |
| 61 // Build the dialog. | 61 // Build the dialog. |
| 62 dialog_ = gtk_dialog_new_with_buttons( | 62 dialog_ = gtk_dialog_new_with_buttons( |
| 63 l10n_util::GetStringUTF8(IDS_EXTENSION_UNINSTALL_PROMPT_TITLE).c_str(), | 63 l10n_util::GetStringUTF8(IDS_EXTENSION_UNINSTALL_PROMPT_TITLE).c_str(), |
| 64 browser_window->GetNativeHandle(), | 64 browser_window->GetNativeWindow(), |
| 65 GTK_DIALOG_MODAL, | 65 GTK_DIALOG_MODAL, |
| 66 GTK_STOCK_CANCEL, | 66 GTK_STOCK_CANCEL, |
| 67 GTK_RESPONSE_CLOSE, | 67 GTK_RESPONSE_CLOSE, |
| 68 l10n_util::GetStringUTF8(IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON).c_str(), | 68 l10n_util::GetStringUTF8(IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON).c_str(), |
| 69 GTK_RESPONSE_ACCEPT, | 69 GTK_RESPONSE_ACCEPT, |
| 70 NULL); | 70 NULL); |
| 71 #if !GTK_CHECK_VERSION(2, 22, 0) | 71 #if !GTK_CHECK_VERSION(2, 22, 0) |
| 72 gtk_dialog_set_has_separator(GTK_DIALOG(dialog_), FALSE); | 72 gtk_dialog_set_has_separator(GTK_DIALOG(dialog_), FALSE); |
| 73 #endif | 73 #endif |
| 74 | 74 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace | 126 } // namespace |
| 127 | 127 |
| 128 // static | 128 // static |
| 129 // Platform specific implementation of the uninstall dialog show method. | 129 // Platform specific implementation of the uninstall dialog show method. |
| 130 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( | 130 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( |
| 131 Profile* profile, Delegate* delegate) { | 131 Profile* profile, Delegate* delegate) { |
| 132 return new ExtensionUninstallDialogGtk(profile, delegate); | 132 return new ExtensionUninstallDialogGtk(profile, delegate); |
| 133 } | 133 } |
| OLD | NEW |