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 #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/environment.h" | 9 #include "base/environment.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/browser_thread.h" | 11 #include "chrome/browser/browser_thread.h" |
12 #include "chrome/browser/shell_integration.h" | 12 #include "chrome/browser/shell_integration.h" |
13 #include "chrome/browser/tab_contents/tab_contents.h" | 13 #include "chrome/browser/tab_contents/tab_contents.h" |
14 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 14 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
15 #include "chrome/browser/ui/gtk/gtk_util.h" | 15 #include "chrome/browser/ui/gtk/gtk_util.h" |
16 #include "chrome/browser/web_applications/web_app.h" | 16 #include "chrome/browser/web_applications/web_app.h" |
17 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
18 #include "chrome/common/extensions/extension_resource.h" | 18 #include "chrome/common/extensions/extension_resource.h" |
19 #include "gfx/gtk_util.h" | |
20 #include "grit/chromium_strings.h" | 19 #include "grit/chromium_strings.h" |
21 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
22 #include "grit/locale_settings.h" | 21 #include "grit/locale_settings.h" |
23 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 23 #include "ui/gfx/gtk_util.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // Size (in pixels) of the icon preview. | 27 // Size (in pixels) of the icon preview. |
28 const int kIconPreviewSizePixels = 32; | 28 const int kIconPreviewSizePixels = 32; |
29 | 29 |
30 // Height (in lines) of the shortcut description label. | 30 // Height (in lines) of the shortcut description label. |
31 const int kDescriptionLabelHeightLines = 3; | 31 const int kDescriptionLabelHeightLines = 3; |
32 | 32 |
33 } // namespace | 33 } // namespace |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 SkBitmap* image, ExtensionResource resource, int index) { | 319 SkBitmap* image, ExtensionResource resource, int index) { |
320 if (image->isNull()) { | 320 if (image->isNull()) { |
321 NOTREACHED() << "Corrupt image in profile?"; | 321 NOTREACHED() << "Corrupt image in profile?"; |
322 return; | 322 return; |
323 } | 323 } |
324 shortcut_info_.favicon = *image; | 324 shortcut_info_.favicon = *image; |
325 | 325 |
326 CreateIconPixBuf(*image); | 326 CreateIconPixBuf(*image); |
327 CreateDialogBox(parent_); | 327 CreateDialogBox(parent_); |
328 } | 328 } |
OLD | NEW |