Chromium Code Reviews| 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/shell_integration_linux.h" | 5 #include "chrome/browser/shell_integration_linux.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <glib.h> | 8 #include <glib.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 682 | 682 |
| 683 FilePath shortcut_filename = GetExtensionShortcutFilename( | 683 FilePath shortcut_filename = GetExtensionShortcutFilename( |
| 684 profile_path, extension_id); | 684 profile_path, extension_id); |
| 685 DCHECK(!shortcut_filename.empty()); | 685 DCHECK(!shortcut_filename.empty()); |
| 686 | 686 |
| 687 DeleteShortcutOnDesktop(shortcut_filename); | 687 DeleteShortcutOnDesktop(shortcut_filename); |
| 688 DeleteShortcutInApplicationsMenu(shortcut_filename); | 688 DeleteShortcutInApplicationsMenu(shortcut_filename); |
| 689 } | 689 } |
| 690 | 690 |
| 691 void LaunchDefaultBrowser(const GURL& url) { | |
|
Mihai Parparita -not on Chrome
2012/09/04 21:39:53
This is already implemented (for all platforms) by
| |
| 692 std::vector<std::string> argv; | |
| 693 argv.push_back("xdg-open"); | |
| 694 argv.push_back(url.spec().c_str()); | |
| 695 | |
| 696 int exit_code; | |
| 697 LaunchXdgUtility(argv, &exit_code); | |
| 698 } | |
| 699 | |
| 691 } // namespace ShellIntegrationLinux | 700 } // namespace ShellIntegrationLinux |
| OLD | NEW |