diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 22:35:15 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 22:35:15 +0000 |
commit | 0b303cc493d3557b5a5e9e5c8dfc6bdc4953ee73 (patch) | |
tree | 807e7e57f0d329087bd1ba12baca7684f8553e5e /chrome/browser/gtk | |
parent | 12636df0dcf36c769c8a5940d6a0c0b6b6a6647c (diff) | |
download | chromium_src-0b303cc493d3557b5a5e9e5c8dfc6bdc4953ee73.zip chromium_src-0b303cc493d3557b5a5e9e5c8dfc6bdc4953ee73.tar.gz chromium_src-0b303cc493d3557b5a5e9e5c8dfc6bdc4953ee73.tar.bz2 |
Use favicon for application shortcut icon.
BUG=22528
Review URL: http://codereview.chromium.org/249023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27422 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r-- | chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc | 14 | ||||
-rw-r--r-- | chrome/browser/gtk/create_application_shortcuts_dialog_gtk.h | 15 |
2 files changed, 22 insertions, 7 deletions
diff --git a/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc b/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc index 91052e2..56a5908 100644 --- a/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc +++ b/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc @@ -12,14 +12,19 @@ // static void CreateApplicationShortcutsDialogGtk::Show(GtkWindow* parent, const GURL& url, - const string16& title) { - new CreateApplicationShortcutsDialogGtk(parent, url, title); + const string16& title, + const SkBitmap& favicon) { + new CreateApplicationShortcutsDialogGtk(parent, url, title, favicon); } CreateApplicationShortcutsDialogGtk::CreateApplicationShortcutsDialogGtk( - GtkWindow* parent, const GURL& url, const string16& title) + GtkWindow* parent, + const GURL& url, + const string16& title, + const SkBitmap& favicon) : url_(url), - title_(title) { + title_(title), + favicon_(favicon) { // Build the dialog. GtkWidget* dialog = gtk_dialog_new_with_buttons( l10n_util::GetStringUTF8(IDS_CREATE_SHORTCUTS_TITLE).c_str(), @@ -68,6 +73,7 @@ void CreateApplicationShortcutsDialogGtk::OnDialogResponse(GtkWidget* widget, ShellIntegration::ShortcutInfo shortcut_info; shortcut_info.url = url_; shortcut_info.title = title_; + shortcut_info.favicon = favicon_; shortcut_info.create_on_desktop = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(desktop_checkbox_)); shortcut_info.create_in_applications_menu = diff --git a/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.h b/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.h index f1b9081..13bb66a 100644 --- a/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.h +++ b/chrome/browser/gtk/create_application_shortcuts_dialog_gtk.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/string16.h" #include "googleurl/src/gurl.h" +#include "third_party/skia/include/core/SkBitmap.h" typedef struct _GtkWidget GtkWidget; typedef struct _GtkWindow GtkWindow; @@ -16,11 +17,16 @@ class CreateApplicationShortcutsDialogGtk { public: // Displays the dialog box to create application shortcuts for |url| with // |title|. - static void Show(GtkWindow* parent, const GURL& url, const string16& title); + static void Show(GtkWindow* parent, + const GURL& url, + const string16& title, + const SkBitmap& favicon); private: - CreateApplicationShortcutsDialogGtk(GtkWindow* parent, const GURL& url, - const string16& title); + CreateApplicationShortcutsDialogGtk(GtkWindow* parent, + const GURL& url, + const string16& title, + const SkBitmap& favicon); ~CreateApplicationShortcutsDialogGtk() { } // Handler to respond to Ok and Cancel responses from the dialog. @@ -41,6 +47,9 @@ class CreateApplicationShortcutsDialogGtk { // Visible title of the shortcut. string16 title_; + // The favicon of the tab contents, used to set the icon on the desktop. + SkBitmap favicon_; + DISALLOW_COPY_AND_ASSIGN(CreateApplicationShortcutsDialogGtk); }; |