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" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/shell_integration.h" | 13 #include "chrome/browser/shell_integration.h" |
14 #include "chrome/browser/shell_integration_linux.h" | 14 #include "chrome/browser/shell_integration_linux.h" |
15 #include "chrome/browser/ui/gtk/gtk_util.h" | 15 #include "chrome/browser/ui/gtk/gtk_util.h" |
16 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
17 #include "chrome/browser/ui/web_applications/web_app_ui.h" | 17 #include "chrome/browser/ui/web_applications/web_app_ui.h" |
18 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 18 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
19 #include "chrome/browser/web_applications/web_app.h" | 19 #include "chrome/browser/web_applications/web_app.h" |
20 #include "chrome/common/extensions/extension.h" | 20 #include "chrome/common/extensions/extension.h" |
21 #include "chrome/common/extensions/extension_resource.h" | 21 #include "chrome/common/extensions/extension_resource.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "content/public/browser/web_contents_delegate.h" | 24 #include "content/public/browser/web_contents_delegate.h" |
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_standard.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 using extensions::Extension; |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 362 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
363 | 363 |
364 if (web_app::CreateShortcutOnFileThread(profile_path_, shortcut_info)) { | 364 if (web_app::CreateShortcutOnFileThread(profile_path_, shortcut_info)) { |
365 Release(); | 365 Release(); |
366 } else { | 366 } else { |
367 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 367 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
368 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog, | 368 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog, |
369 this)); | 369 this)); |
370 } | 370 } |
371 } | 371 } |
OLD | NEW |