OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "chrome/browser/web_applications/web_app.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
11 | 11 |
12 #include <algorithm> | 12 #include <algorithm> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
19 #include "base/md5.h" | 19 #include "base/md5.h" |
20 #include "base/message_loop.h" | 20 #include "base/message_loop.h" |
21 #include "base/path_service.h" | 21 #include "base/path_service.h" |
| 22 #include "base/scoped_ptr.h" |
22 #include "base/threading/thread.h" | 23 #include "base/threading/thread.h" |
23 #include "base/scoped_ptr.h" | |
24 #include "base/utf_string_conversions.h" | 24 #include "base/utf_string_conversions.h" |
25 #include "base/win/windows_version.h" | 25 #include "base/win/windows_version.h" |
26 #include "chrome/browser/download/download_util.h" | 26 #include "chrome/browser/download/download_util.h" |
27 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
28 #include "chrome/common/chrome_constants.h" | 28 #include "chrome/common/chrome_constants.h" |
29 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
30 #include "chrome/common/chrome_plugin_util.h" | 30 #include "chrome/common/chrome_plugin_util.h" |
31 #include "chrome/common/extensions/extension.h" | 31 #include "chrome/common/extensions/extension.h" |
32 #include "chrome/common/notification_registrar.h" | |
33 #include "chrome/common/url_constants.h" | 32 #include "chrome/common/url_constants.h" |
34 #include "chrome/common/web_apps.h" | 33 #include "chrome/common/web_apps.h" |
35 #include "content/browser/browser_thread.h" | 34 #include "content/browser/browser_thread.h" |
36 #include "content/browser/tab_contents/tab_contents.h" | 35 #include "content/browser/tab_contents/tab_contents.h" |
| 36 #include "content/common/notification_registrar.h" |
37 | 37 |
38 #if defined(OS_LINUX) | 38 #if defined(OS_LINUX) |
39 #include "base/environment.h" | 39 #include "base/environment.h" |
40 #endif // defined(OS_LINUX) | 40 #endif // defined(OS_LINUX) |
41 | 41 |
42 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
43 #include "base/win/win_util.h" | 43 #include "base/win/win_util.h" |
44 #include "chrome/common/notification_details.h" | 44 #include "content/common/notification_details.h" |
45 #include "chrome/common/notification_source.h" | 45 #include "content/common/notification_source.h" |
46 #include "ui/gfx/icon_util.h" | 46 #include "ui/gfx/icon_util.h" |
47 #endif // defined(OS_WIN) | 47 #endif // defined(OS_WIN) |
48 | 48 |
49 namespace { | 49 namespace { |
50 | 50 |
51 #if defined(OS_WIN) | 51 #if defined(OS_WIN) |
52 const FilePath::CharType kIconChecksumFileExt[] = FILE_PATH_LITERAL(".ico.md5"); | 52 const FilePath::CharType kIconChecksumFileExt[] = FILE_PATH_LITERAL(".ico.md5"); |
53 | 53 |
54 // Returns true if |ch| is in visible ASCII range and not one of | 54 // Returns true if |ch| is in visible ASCII range and not one of |
55 // "/ \ : * ? " < > | ; ,". | 55 // "/ \ : * ? " < > | ; ,". |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 795 |
796 void UpdateShortcutForTabContents(TabContents* tab_contents) { | 796 void UpdateShortcutForTabContents(TabContents* tab_contents) { |
797 #if defined(OS_WIN) | 797 #if defined(OS_WIN) |
798 // UpdateShortcutWorker will delete itself when it's done. | 798 // UpdateShortcutWorker will delete itself when it's done. |
799 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); | 799 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); |
800 worker->Run(); | 800 worker->Run(); |
801 #endif // defined(OS_WIN) | 801 #endif // defined(OS_WIN) |
802 } | 802 } |
803 | 803 |
804 }; // namespace web_app | 804 }; // namespace web_app |
OLD | NEW |