Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(743)

Side by Side Diff: chrome/browser/gtk/create_application_shortcuts_dialog_gtk.h

Issue 249023: Use favicon for application shortcut icon. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fixed unittests, handle null favicon Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
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 #ifndef CHROME_BROWSER_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_
6 #define CHROME_BROWSER_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ 6 #define CHROME_BROWSER_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
11 #include "third_party/skia/include/core/SkBitmap.h"
11 12
12 typedef struct _GtkWidget GtkWidget; 13 typedef struct _GtkWidget GtkWidget;
13 typedef struct _GtkWindow GtkWindow; 14 typedef struct _GtkWindow GtkWindow;
14 15
15 class CreateApplicationShortcutsDialogGtk { 16 class CreateApplicationShortcutsDialogGtk {
16 public: 17 public:
17 // Displays the dialog box to create application shortcuts for |url| with 18 // Displays the dialog box to create application shortcuts for |url| with
18 // |title|. 19 // |title|.
19 static void Show(GtkWindow* parent, const GURL& url, const string16& title); 20 static void Show(GtkWindow* parent,
21 const GURL& url,
22 const string16& title,
23 const SkBitmap& favicon);
20 24
21 private: 25 private:
22 CreateApplicationShortcutsDialogGtk(GtkWindow* parent, const GURL& url, 26 CreateApplicationShortcutsDialogGtk(GtkWindow* parent,
23 const string16& title); 27 const GURL& url,
28 const string16& title,
29 const SkBitmap& favicon);
24 ~CreateApplicationShortcutsDialogGtk() { } 30 ~CreateApplicationShortcutsDialogGtk() { }
25 31
26 // Handler to respond to Ok and Cancel responses from the dialog. 32 // Handler to respond to Ok and Cancel responses from the dialog.
27 static void HandleOnResponseDialog(GtkWidget* widget, 33 static void HandleOnResponseDialog(GtkWidget* widget,
28 int response, CreateApplicationShortcutsDialogGtk* user_data) { 34 int response, CreateApplicationShortcutsDialogGtk* user_data) {
29 user_data->OnDialogResponse(widget, response); 35 user_data->OnDialogResponse(widget, response);
30 } 36 }
31 37
32 void OnDialogResponse(GtkWidget* widget, int response); 38 void OnDialogResponse(GtkWidget* widget, int response);
33 39
34 // UI elements. 40 // UI elements.
35 GtkWidget* desktop_checkbox_; 41 GtkWidget* desktop_checkbox_;
36 GtkWidget* menu_checkbox_; 42 GtkWidget* menu_checkbox_;
37 43
38 // Target URL of the shortcut. 44 // Target URL of the shortcut.
39 GURL url_; 45 GURL url_;
40 46
41 // Visible title of the shortcut. 47 // Visible title of the shortcut.
42 string16 title_; 48 string16 title_;
43 49
50 // The favicon of the tab contents, used to set the icon on the desktop.
51 SkBitmap favicon_;
52
44 DISALLOW_COPY_AND_ASSIGN(CreateApplicationShortcutsDialogGtk); 53 DISALLOW_COPY_AND_ASSIGN(CreateApplicationShortcutsDialogGtk);
45 }; 54 };
46 55
47 #endif // CHROME_BROWSER_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ 56 #endif // CHROME_BROWSER_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698