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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 web_contents_(web_contents) { | 297 web_contents_(web_contents) { |
298 | 298 |
299 // Get shortcut information now, it's needed for our UI. | 299 // Get shortcut information now, it's needed for our UI. |
300 web_app::GetShortcutInfoForTab(web_contents, &shortcut_info_); | 300 web_app::GetShortcutInfoForTab(web_contents, &shortcut_info_); |
301 CreateIconPixBuf(shortcut_info_.favicon); | 301 CreateIconPixBuf(shortcut_info_.favicon); |
302 | 302 |
303 CreateDialogBox(parent); | 303 CreateDialogBox(parent); |
304 } | 304 } |
305 | 305 |
306 void CreateWebApplicationShortcutsDialogGtk::OnCreatedShortcut() { | 306 void CreateWebApplicationShortcutsDialogGtk::OnCreatedShortcut() { |
307 Browser* browser = browser::FindBrowserWithWebContents(web_contents_); | 307 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); |
308 if (browser) | 308 if (browser) |
309 chrome::ConvertTabToAppWindow(browser, web_contents_); | 309 chrome::ConvertTabToAppWindow(browser, web_contents_); |
310 } | 310 } |
311 | 311 |
312 CreateChromeApplicationShortcutsDialogGtk:: | 312 CreateChromeApplicationShortcutsDialogGtk:: |
313 CreateChromeApplicationShortcutsDialogGtk( | 313 CreateChromeApplicationShortcutsDialogGtk( |
314 GtkWindow* parent, | 314 GtkWindow* parent, |
315 Profile* profile, | 315 Profile* profile, |
316 const Extension* app) | 316 const Extension* app) |
317 : CreateApplicationShortcutsDialogGtk(parent), | 317 : CreateApplicationShortcutsDialogGtk(parent), |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 363 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
364 | 364 |
365 if (web_app::CreateShortcutsOnFileThread(shortcut_info)) { | 365 if (web_app::CreateShortcutsOnFileThread(shortcut_info)) { |
366 Release(); | 366 Release(); |
367 } else { | 367 } else { |
368 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 368 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
369 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog, | 369 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog, |
370 this)); | 370 this)); |
371 } | 371 } |
372 } | 372 } |
OLD | NEW |