| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 CHROMEGTK_CALLBACK_1(CreateApplicationShortcutsDialogGtk, void, | 36 CHROMEGTK_CALLBACK_1(CreateApplicationShortcutsDialogGtk, void, |
| 37 OnCreateDialogResponse, int); | 37 OnCreateDialogResponse, int); |
| 38 | 38 |
| 39 CHROMEGTK_CALLBACK_1(CreateApplicationShortcutsDialogGtk, void, | 39 CHROMEGTK_CALLBACK_1(CreateApplicationShortcutsDialogGtk, void, |
| 40 OnErrorDialogResponse, int); | 40 OnErrorDialogResponse, int); |
| 41 | 41 |
| 42 CHROMEGTK_CALLBACK_0(CreateApplicationShortcutsDialogGtk, void, | 42 CHROMEGTK_CALLBACK_0(CreateApplicationShortcutsDialogGtk, void, |
| 43 OnToggleCheckbox); | 43 OnToggleCheckbox); |
| 44 | 44 |
| 45 virtual void CreateDialogBox(GtkWindow* parent); | 45 virtual void CreateDialogBox(GtkWindow* parent); |
| 46 virtual void CreateIconPixBuf(const SkBitmap& bitmap); | 46 virtual void CreateIconPixBuf(const gfx::Image& image); |
| 47 | 47 |
| 48 // This method is called after a shortcut is created. | 48 // This method is called after a shortcut is created. |
| 49 // Subclasses can override it to take some action at that time. | 49 // Subclasses can override it to take some action at that time. |
| 50 virtual void OnCreatedShortcut(void) {} | 50 virtual void OnCreatedShortcut(void) {} |
| 51 | 51 |
| 52 void CreateDesktopShortcut( | 52 void CreateDesktopShortcut( |
| 53 const ShellIntegration::ShortcutInfo& shortcut_info); | 53 const ShellIntegration::ShortcutInfo& shortcut_info); |
| 54 void ShowErrorDialog(); | 54 void ShowErrorDialog(); |
| 55 | 55 |
| 56 GtkWindow* parent_; | 56 GtkWindow* parent_; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // Displays the dialog box to create application shortcuts for |app|. | 104 // Displays the dialog box to create application shortcuts for |app|. |
| 105 static void Show(GtkWindow* parent, const Extension* app); | 105 static void Show(GtkWindow* parent, const Extension* app); |
| 106 | 106 |
| 107 CreateChromeApplicationShortcutsDialogGtk(GtkWindow* parent, | 107 CreateChromeApplicationShortcutsDialogGtk(GtkWindow* parent, |
| 108 const Extension* app); | 108 const Extension* app); |
| 109 virtual ~CreateChromeApplicationShortcutsDialogGtk() {} | 109 virtual ~CreateChromeApplicationShortcutsDialogGtk() {} |
| 110 | 110 |
| 111 // Implement ImageLoadingTracker::Observer. |tracker_| is used to | 111 // Implement ImageLoadingTracker::Observer. |tracker_| is used to |
| 112 // load the app's icon. This method recieves the icon, and adds | 112 // load the app's icon. This method recieves the icon, and adds |
| 113 // it to the "Create Shortcut" dailog box. | 113 // it to the "Create Shortcut" dailog box. |
| 114 virtual void OnImageLoaded(SkBitmap* image, | 114 virtual void OnImageLoaded(const gfx::Image& image, |
| 115 const ExtensionResource& resource, | 115 const std::string& extension_id, |
| 116 int index) OVERRIDE; | 116 int index) OVERRIDE; |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 const Extension* app_; | 119 const Extension* app_; |
| 120 ImageLoadingTracker tracker_; | 120 ImageLoadingTracker tracker_; |
| 121 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutsDialogGtk); | 121 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutsDialogGtk); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 #endif // CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ | 124 #endif // CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ |
| OLD | NEW |