OLD | NEW |
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 #include "chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h" | 5 #include "chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "grit/chromium_strings.h" | 25 #include "grit/chromium_strings.h" |
26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
27 #include "grit/locale_settings.h" | 27 #include "grit/locale_settings.h" |
28 #include "grit/theme_resources.h" | 28 #include "grit/theme_resources.h" |
29 #include "ui/base/gtk/gtk_hig_constants.h" | 29 #include "ui/base/gtk/gtk_hig_constants.h" |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 #include "ui/base/resource/resource_bundle.h" | 31 #include "ui/base/resource/resource_bundle.h" |
32 #include "ui/gfx/gtk_util.h" | 32 #include "ui/gfx/gtk_util.h" |
33 | 33 |
34 using content::BrowserThread; | 34 using content::BrowserThread; |
| 35 using extensions::Extension; |
35 | 36 |
36 namespace { | 37 namespace { |
37 | 38 |
38 // Size (in pixels) of the icon preview. | 39 // Size (in pixels) of the icon preview. |
39 const int kIconPreviewSizePixels = 32; | 40 const int kIconPreviewSizePixels = 32; |
40 | 41 |
41 // Height (in lines) of the shortcut description label. | 42 // Height (in lines) of the shortcut description label. |
42 const int kDescriptionLabelHeightLines = 3; | 43 const int kDescriptionLabelHeightLines = 3; |
43 | 44 |
44 } // namespace | 45 } // namespace |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 362 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
362 | 363 |
363 if (web_app::CreateShortcutOnFileThread(profile_path_, shortcut_info)) { | 364 if (web_app::CreateShortcutOnFileThread(profile_path_, shortcut_info)) { |
364 Release(); | 365 Release(); |
365 } else { | 366 } else { |
366 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 367 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
367 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog, | 368 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog, |
368 this)); | 369 this)); |
369 } | 370 } |
370 } | 371 } |
OLD | NEW |