| 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 29 matching lines...) Expand all Loading... |
| 40 using extensions::Extension; | 40 using extensions::Extension; |
| 41 | 41 |
| 42 namespace { | 42 namespace { |
| 43 | 43 |
| 44 // Size (in pixels) of the icon preview. | 44 // Size (in pixels) of the icon preview. |
| 45 const int kIconPreviewSizePixels = 32; | 45 const int kIconPreviewSizePixels = 32; |
| 46 | 46 |
| 47 // Minimum width (in pixels) of the shortcut description label. | 47 // Minimum width (in pixels) of the shortcut description label. |
| 48 const int kDescriptionLabelMinimumWidthPixels = 200; | 48 const int kDescriptionLabelMinimumWidthPixels = 200; |
| 49 | 49 |
| 50 // Height (in lines) of the shortcut description label. | |
| 51 const int kDescriptionLabelHeightLines = 3; | |
| 52 | |
| 53 } // namespace | 50 } // namespace |
| 54 | 51 |
| 55 namespace chrome { | 52 namespace chrome { |
| 56 | 53 |
| 57 void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window, | 54 void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window, |
| 58 content::WebContents* web_contents) { | 55 content::WebContents* web_contents) { |
| 59 new CreateWebApplicationShortcutsDialogGtk(parent_window, web_contents); | 56 new CreateWebApplicationShortcutsDialogGtk(parent_window, web_contents); |
| 60 } | 57 } |
| 61 | 58 |
| 62 } // namespace chrome | 59 } // namespace chrome |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 if (web_app::CreateShortcutsOnFileThread( | 347 if (web_app::CreateShortcutsOnFileThread( |
| 351 shortcut_info, creation_locations, | 348 shortcut_info, creation_locations, |
| 352 web_app::SHORTCUT_CREATION_BY_USER)) { | 349 web_app::SHORTCUT_CREATION_BY_USER)) { |
| 353 Release(); | 350 Release(); |
| 354 } else { | 351 } else { |
| 355 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 352 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 356 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog, | 353 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog, |
| 357 this)); | 354 this)); |
| 358 } | 355 } |
| 359 } | 356 } |
| OLD | NEW |