| 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 #include <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/extensions/bundle_installer.h" | 10 #include "chrome/browser/extensions/bundle_installer.h" |
| 11 #include "chrome/browser/extensions/extension_install_dialog.h" | 11 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 13 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| 14 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" | 14 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" |
| 15 #include "chrome/browser/ui/gtk/gtk_util.h" | 15 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 16 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
| 17 #include "content/public/browser/page_navigator.h" | 17 #include "content/public/browser/page_navigator.h" |
| 18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 19 #include "skia/ext/image_operations.h" | 19 #include "skia/ext/image_operations.h" |
| 20 #include "ui/base/gtk/gtk_hig_constants.h" | 20 #include "ui/base/gtk/gtk_hig_constants.h" |
| 21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 gtk_util::SetLabelWidth(label, label_pixel_width); | 376 gtk_util::SetLabelWidth(label, label_pixel_width); |
| 377 if (arrow) | 377 if (arrow) |
| 378 gtk_box_pack_start(GTK_BOX(header), arrow, FALSE, FALSE, 0); | 378 gtk_box_pack_start(GTK_BOX(header), arrow, FALSE, FALSE, 0); |
| 379 gtk_box_pack_start(GTK_BOX(header), label, TRUE, TRUE, 0); | 379 gtk_box_pack_start(GTK_BOX(header), label, TRUE, TRUE, 0); |
| 380 | 380 |
| 381 return box; | 381 return box; |
| 382 } | 382 } |
| 383 | 383 |
| 384 } // namespace browser | 384 } // namespace browser |
| 385 | 385 |
| 386 namespace { |
| 387 |
| 386 void ShowExtensionInstallDialogImpl( | 388 void ShowExtensionInstallDialogImpl( |
| 387 gfx::NativeWindow parent, | 389 gfx::NativeWindow parent, |
| 388 content::PageNavigator* navigator, | 390 content::PageNavigator* navigator, |
| 389 ExtensionInstallPrompt::Delegate* delegate, | 391 ExtensionInstallPrompt::Delegate* delegate, |
| 390 const ExtensionInstallPrompt::Prompt& prompt) { | 392 const ExtensionInstallPrompt::Prompt& prompt) { |
| 391 new browser::ExtensionInstallDialog(parent, navigator, delegate, prompt); | 393 new browser::ExtensionInstallDialog(parent, navigator, delegate, prompt); |
| 392 } | 394 } |
| 395 |
| 396 } // namespace |
| 397 |
| 398 // static |
| 399 ExtensionInstallPrompt::ShowDialogCallback |
| 400 ExtensionInstallPrompt::GetDefaultShowDialogCallback() { |
| 401 return base::Bind(&ShowExtensionInstallDialogImpl); |
| 402 } |
| OLD | NEW |