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

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

Issue 10392152: RefCounted types should not have public destructors, Linux fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 #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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 }; 78 };
79 79
80 class CreateWebApplicationShortcutsDialogGtk 80 class CreateWebApplicationShortcutsDialogGtk
81 : public CreateApplicationShortcutsDialogGtk { 81 : public CreateApplicationShortcutsDialogGtk {
82 public: 82 public:
83 // Displays the dialog box to create application shortcuts for |tab_contents|. 83 // Displays the dialog box to create application shortcuts for |tab_contents|.
84 static void Show(GtkWindow* parent, TabContentsWrapper* tab_contents); 84 static void Show(GtkWindow* parent, TabContentsWrapper* tab_contents);
85 85
86 CreateWebApplicationShortcutsDialogGtk(GtkWindow* parent, 86 CreateWebApplicationShortcutsDialogGtk(GtkWindow* parent,
87 TabContentsWrapper* tab_contents); 87 TabContentsWrapper* tab_contents);
88 virtual ~CreateWebApplicationShortcutsDialogGtk() {}
89 88
90 virtual void OnCreatedShortcut(void) OVERRIDE; 89 virtual void OnCreatedShortcut(void) OVERRIDE;
91 90
91 protected:
92 virtual ~CreateWebApplicationShortcutsDialogGtk() {}
93
92 private: 94 private:
93
94 // TabContentsWrapper for which the shortcut will be created. 95 // TabContentsWrapper for which the shortcut will be created.
95 TabContentsWrapper* tab_contents_; 96 TabContentsWrapper* tab_contents_;
96 97
97 DISALLOW_COPY_AND_ASSIGN(CreateWebApplicationShortcutsDialogGtk); 98 DISALLOW_COPY_AND_ASSIGN(CreateWebApplicationShortcutsDialogGtk);
98 }; 99 };
99 100
100 class CreateChromeApplicationShortcutsDialogGtk 101 class CreateChromeApplicationShortcutsDialogGtk
101 : public CreateApplicationShortcutsDialogGtk, 102 : public CreateApplicationShortcutsDialogGtk,
102 public ImageLoadingTracker::Observer { 103 public ImageLoadingTracker::Observer {
103 public: 104 public:
104 // Displays the dialog box to create application shortcuts for |app|. 105 // Displays the dialog box to create application shortcuts for |app|.
105 static void Show(GtkWindow* parent, Profile* profile, const Extension* app); 106 static void Show(GtkWindow* parent, Profile* profile, const Extension* app);
106 107
107 CreateChromeApplicationShortcutsDialogGtk(GtkWindow* parent, 108 CreateChromeApplicationShortcutsDialogGtk(GtkWindow* parent,
108 Profile* profile, 109 Profile* profile,
109 const Extension* app); 110 const Extension* app);
110 virtual ~CreateChromeApplicationShortcutsDialogGtk() {}
111 111
112 // Implement ImageLoadingTracker::Observer. |tracker_| is used to 112 // Implement ImageLoadingTracker::Observer. |tracker_| is used to
113 // load the app's icon. This method recieves the icon, and adds 113 // load the app's icon. This method recieves the icon, and adds
114 // it to the "Create Shortcut" dailog box. 114 // it to the "Create Shortcut" dailog box.
115 virtual void OnImageLoaded(const gfx::Image& image, 115 virtual void OnImageLoaded(const gfx::Image& image,
116 const std::string& extension_id, 116 const std::string& extension_id,
117 int index) OVERRIDE; 117 int index) OVERRIDE;
118 118
119 protected: 119 protected:
120 virtual ~CreateChromeApplicationShortcutsDialogGtk() {}
121
120 virtual void CreateDesktopShortcut( 122 virtual void CreateDesktopShortcut(
121 const ShellIntegration::ShortcutInfo& shortcut_info) OVERRIDE; 123 const ShellIntegration::ShortcutInfo& shortcut_info) OVERRIDE;
122 124
123 private: 125 private:
124 const Extension* app_; 126 const Extension* app_;
125 FilePath profile_path_; 127 FilePath profile_path_;
126 ImageLoadingTracker tracker_; 128 ImageLoadingTracker tracker_;
127 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutsDialogGtk); 129 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutsDialogGtk);
128 }; 130 };
129 131
130 #endif // CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_ 132 #endif // CHROME_BROWSER_UI_GTK_CREATE_APPLICATION_SHORTCUTS_DIALOG_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698