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

Side by Side Diff: chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc

Issue 1606007: Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h. Labe... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix windows build for good this time? Created 10 years, 8 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
« no previous file with comments | « base/sys_info.h ('k') | chrome/browser/gtk/gtk_theme_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/gtk/create_application_shortcuts_dialog_gtk.h" 5 #include "chrome/browser/gtk/create_application_shortcuts_dialog_gtk.h"
6 6
7 #include <string>
8
7 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
8 #include "base/linux_util.h" 10 #include "base/env_var.h"
9 #include "chrome/browser/chrome_thread.h" 11 #include "chrome/browser/chrome_thread.h"
10 #include "chrome/browser/gtk/gtk_util.h" 12 #include "chrome/browser/gtk/gtk_util.h"
11 #include "chrome/browser/shell_integration.h" 13 #include "chrome/browser/shell_integration.h"
12 #include "chrome/browser/tab_contents/tab_contents.h" 14 #include "chrome/browser/tab_contents/tab_contents.h"
13 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 15 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
14 #include "grit/chromium_strings.h" 16 #include "grit/chromium_strings.h"
15 #include "grit/generated_resources.h" 17 #include "grit/generated_resources.h"
16 #include "grit/locale_settings.h" 18 #include "grit/locale_settings.h"
17 19
18 // static 20 // static
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 119
118 void CreateApplicationShortcutsDialogGtk::OnErrorDialogResponse( 120 void CreateApplicationShortcutsDialogGtk::OnErrorDialogResponse(
119 GtkWidget* widget, int response) { 121 GtkWidget* widget, int response) {
120 Release(); 122 Release();
121 } 123 }
122 124
123 void CreateApplicationShortcutsDialogGtk::CreateDesktopShortcut( 125 void CreateApplicationShortcutsDialogGtk::CreateDesktopShortcut(
124 const ShellIntegration::ShortcutInfo& shortcut_info) { 126 const ShellIntegration::ShortcutInfo& shortcut_info) {
125 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE)); 127 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
126 128
127 scoped_ptr<base::EnvironmentVariableGetter> env_getter( 129 scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create());
128 base::EnvironmentVariableGetter::Create());
129 130
130 std::string shortcut_template; 131 std::string shortcut_template;
131 if (ShellIntegration::GetDesktopShortcutTemplate(env_getter.get(), 132 if (ShellIntegration::GetDesktopShortcutTemplate(env_getter.get(),
132 &shortcut_template)) { 133 &shortcut_template)) {
133 ShellIntegration::CreateDesktopShortcut(shortcut_info, 134 ShellIntegration::CreateDesktopShortcut(shortcut_info,
134 shortcut_template); 135 shortcut_template);
135 Release(); 136 Release();
136 } else { 137 } else {
137 ChromeThread::PostTask(ChromeThread::UI, FROM_HERE, 138 ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
138 NewRunnableMethod(this, 139 NewRunnableMethod(this,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 IDS_CREATE_SHORTCUTS_ERROR_LABEL, 172 IDS_CREATE_SHORTCUTS_ERROR_LABEL,
172 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)).c_str()); 173 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)).c_str());
173 gtk_label_set_line_wrap(GTK_LABEL(description), TRUE); 174 gtk_label_set_line_wrap(GTK_LABEL(description), TRUE);
174 gtk_misc_set_alignment(GTK_MISC(description), 0, 0); 175 gtk_misc_set_alignment(GTK_MISC(description), 0, 0);
175 gtk_box_pack_start(GTK_BOX(vbox), description, FALSE, FALSE, 0); 176 gtk_box_pack_start(GTK_BOX(vbox), description, FALSE, FALSE, 0);
176 177
177 g_signal_connect(error_dialog_, "response", 178 g_signal_connect(error_dialog_, "response",
178 G_CALLBACK(HandleOnResponseErrorDialog), this); 179 G_CALLBACK(HandleOnResponseErrorDialog), this);
179 gtk_widget_show_all(error_dialog_); 180 gtk_widget_show_all(error_dialog_);
180 } 181 }
OLDNEW
« no previous file with comments | « base/sys_info.h ('k') | chrome/browser/gtk/gtk_theme_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698