| 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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 DISALLOW_COPY_AND_ASSIGN(CreateWebApplicationShortcutsDialogGtk); | 93 DISALLOW_COPY_AND_ASSIGN(CreateWebApplicationShortcutsDialogGtk); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 class CreateChromeApplicationShortcutsDialogGtk | 96 class CreateChromeApplicationShortcutsDialogGtk |
| 97 : public CreateApplicationShortcutsDialogGtk, | 97 : public CreateApplicationShortcutsDialogGtk, |
| 98 public ImageLoadingTracker::Observer { | 98 public ImageLoadingTracker::Observer { |
| 99 public: | 99 public: |
| 100 // Displays the dialog box to create application shortcuts for |app|. | 100 // Displays the dialog box to create application shortcuts for |app|. |
| 101 static void Show(GtkWindow* parent, const Extension* app); | 101 static void Show(GtkWindow* parent, const Extension* app); |
| 102 | 102 |
| 103 explicit CreateChromeApplicationShortcutsDialogGtk(GtkWindow* parent, | 103 CreateChromeApplicationShortcutsDialogGtk(GtkWindow* parent, |
| 104 const Extension* app); | 104 const Extension* app); |
| 105 virtual ~CreateChromeApplicationShortcutsDialogGtk() {} | 105 virtual ~CreateChromeApplicationShortcutsDialogGtk() {} |
| 106 | 106 |
| 107 // Implement ImageLoadingTracker::Observer. |tracker_| is used to | 107 // Implement ImageLoadingTracker::Observer. |tracker_| is used to |
| 108 // load the app's icon. This method recieves the icon, and adds | 108 // load the app's icon. This method recieves the icon, and adds |
| 109 // it to the "Create Shortcut" dailog box. | 109 // it to the "Create Shortcut" dailog box. |
| 110 virtual void OnImageLoaded(SkBitmap* image, | 110 virtual void OnImageLoaded(SkBitmap* image, |
| 111 const ExtensionResource& resource, | 111 const ExtensionResource& resource, |
| 112 int index); | 112 int index); |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 const Extension* app_; | 115 const Extension* app_; |
| 116 ImageLoadingTracker tracker_; | 116 ImageLoadingTracker tracker_; |
| 117 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutsDialogGtk); | 117 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutsDialogGtk); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 #endif // CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ | 120 #endif // CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ |
| OLD | NEW |