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

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

Issue 231673005: Move ShortcutInfo, ShortcutLocations from ShellIntegration to web_app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windws Created 6 years, 8 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
OLDNEW
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 #ifndef CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/sequenced_task_runner_helpers.h" 11 #include "base/sequenced_task_runner_helpers.h"
12 #include "chrome/browser/shell_integration.h" 12 #include "chrome/browser/web_applications/web_app.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 #include "ui/base/gtk/gtk_signal.h" 14 #include "ui/base/gtk/gtk_signal.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 using content::BrowserThread; 17 using content::BrowserThread;
18 18
19 typedef struct _GdkPixbuf GdkPixbuf; 19 typedef struct _GdkPixbuf GdkPixbuf;
20 typedef struct _GtkWidget GtkWidget; 20 typedef struct _GtkWidget GtkWidget;
21 typedef struct _GtkWindow GtkWindow; 21 typedef struct _GtkWindow GtkWindow;
22 22
(...skipping 28 matching lines...) Expand all
51 OnToggleCheckbox); 51 OnToggleCheckbox);
52 52
53 virtual void CreateDialogBox(GtkWindow* parent); 53 virtual void CreateDialogBox(GtkWindow* parent);
54 virtual void CreateIconPixBuf(const gfx::ImageFamily& image); 54 virtual void CreateIconPixBuf(const gfx::ImageFamily& image);
55 55
56 // This method is called after a shortcut is created. 56 // This method is called after a shortcut is created.
57 // Subclasses can override it to take some action at that time. 57 // Subclasses can override it to take some action at that time.
58 virtual void OnCreatedShortcut(void) {} 58 virtual void OnCreatedShortcut(void) {}
59 59
60 virtual void CreateDesktopShortcut( 60 virtual void CreateDesktopShortcut(
61 const ShellIntegration::ShortcutInfo& shortcut_info, 61 const web_app::ShortcutInfo& shortcut_info,
62 const ShellIntegration::ShortcutLocations& creation_locations); 62 const web_app::ShortcutLocations& creation_locations);
63 virtual void ShowErrorDialog(); 63 virtual void ShowErrorDialog();
64 64
65 GtkWindow* parent_; 65 GtkWindow* parent_;
66 66
67 // UI elements. 67 // UI elements.
68 GtkWidget* desktop_checkbox_; 68 GtkWidget* desktop_checkbox_;
69 GtkWidget* menu_checkbox_; 69 GtkWidget* menu_checkbox_;
70 70
71 // ShortcutInfo for the new shortcut. 71 // ShortcutInfo for the new shortcut.
72 ShellIntegration::ShortcutInfo shortcut_info_; 72 web_app::ShortcutInfo shortcut_info_;
73 // If false the shortcut will be created in the top-level menu. 73 // If false the shortcut will be created in the top-level menu.
74 bool create_in_chrome_apps_subdir_; 74 bool create_in_chrome_apps_subdir_;
75 75
76 // Image associated with the site or app, scaled to the appropriate size to 76 // Image associated with the site or app, scaled to the appropriate size to
77 // display in the dialog box. 77 // display in the dialog box.
78 GdkPixbuf* favicon_pixbuf_; 78 GdkPixbuf* favicon_pixbuf_;
79 79
80 // Dialog box that allows the user to create an application shortcut. 80 // Dialog box that allows the user to create an application shortcut.
81 GtkWidget* create_dialog_; 81 GtkWidget* create_dialog_;
82 82
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 CreateChromeApplicationShortcutsDialogGtk( 116 CreateChromeApplicationShortcutsDialogGtk(
117 GtkWindow* parent, 117 GtkWindow* parent,
118 Profile* profile, 118 Profile* profile,
119 const extensions::Extension* app, 119 const extensions::Extension* app,
120 const base::Closure& close_callback); 120 const base::Closure& close_callback);
121 121
122 protected: 122 protected:
123 virtual ~CreateChromeApplicationShortcutsDialogGtk(); 123 virtual ~CreateChromeApplicationShortcutsDialogGtk();
124 124
125 virtual void CreateDesktopShortcut( 125 virtual void CreateDesktopShortcut(
126 const ShellIntegration::ShortcutInfo& shortcut_info, 126 const web_app::ShortcutInfo& shortcut_info,
127 const ShellIntegration::ShortcutLocations& creation_locations) OVERRIDE; 127 const web_app::ShortcutLocations& creation_locations) OVERRIDE;
128 128
129 private: 129 private:
130 void OnShortcutInfoLoaded( 130 void OnShortcutInfoLoaded(
131 const ShellIntegration::ShortcutInfo& shortcut_info); 131 const web_app::ShortcutInfo& shortcut_info);
132 132
133 const extensions::Extension* app_; 133 const extensions::Extension* app_;
134 base::FilePath profile_path_; 134 base::FilePath profile_path_;
135 base::Closure close_callback_; 135 base::Closure close_callback_;
136 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutsDialogGtk); 136 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutsDialogGtk);
137 }; 137 };
138 138
139 #endif // CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ 139 #endif // CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698