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/web_applications/web_app_win.h" | 5 #include "chrome/browser/web_applications/web_app_win.h" |
6 | 6 |
7 #include <shlobj.h> | 7 #include <shlobj.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/files/file_enumerator.h" | 11 #include "base/files/file_enumerator.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/md5.h" | 13 #include "base/md5.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
15 #include "base/strings/string_piece.h" | 15 #include "base/strings/string_piece.h" |
16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/win/shortcut.h" | 18 #include "base/win/shortcut.h" |
19 #include "base/win/windows_version.h" | 19 #include "base/win/windows_version.h" |
| 20 #include "chrome/browser/web_applications/update_shortcut_worker_win.h" |
20 #include "chrome/browser/web_applications/web_app.h" | 21 #include "chrome/browser/web_applications/web_app.h" |
21 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
22 #include "chrome/installer/util/browser_distribution.h" | 23 #include "chrome/installer/util/browser_distribution.h" |
23 #include "chrome/installer/util/shell_util.h" | 24 #include "chrome/installer/util/shell_util.h" |
24 #include "chrome/installer/util/util_constants.h" | 25 #include "chrome/installer/util/util_constants.h" |
25 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
26 #include "ui/gfx/icon_util.h" | 27 #include "ui/gfx/icon_util.h" |
27 #include "ui/gfx/image/image.h" | 28 #include "ui/gfx/image/image.h" |
28 #include "ui/gfx/image/image_family.h" | 29 #include "ui/gfx/image/image_family.h" |
29 | 30 |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 continue; | 529 continue; |
529 } | 530 } |
530 shortcut_paths.push_back(path); | 531 shortcut_paths.push_back(path); |
531 } | 532 } |
532 } | 533 } |
533 return shortcut_paths; | 534 return shortcut_paths; |
534 } | 535 } |
535 | 536 |
536 } // namespace internals | 537 } // namespace internals |
537 | 538 |
| 539 void UpdateShortcutForTabContents(content::WebContents* web_contents) { |
| 540 // UpdateShortcutWorker will delete itself when it's done. |
| 541 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents); |
| 542 worker->Run(); |
| 543 } |
| 544 |
538 } // namespace web_app | 545 } // namespace web_app |
OLD | NEW |