OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_WIN_H_ | 5 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_WIN_H_ |
6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_WIN_H_ | 6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_WIN_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "chrome/browser/web_applications/web_app.h" | 9 #include "chrome/browser/web_applications/web_app.h" |
10 | 10 |
11 class Profile; | 11 class Profile; |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class WebContents; | 14 class WebContents; |
15 } | 15 } |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 class Extension; | 18 class Extension; |
19 } | 19 } |
20 | 20 |
21 namespace gfx { | 21 namespace gfx { |
22 class ImageFamily; | 22 class ImageFamily; |
23 } | 23 } |
24 | 24 |
25 namespace web_app { | 25 namespace web_app { |
26 | 26 |
27 // Create a shortcut in the given web app data dir, returning the name of the | 27 // Create a shortcut in the given web app data dir, returning the name of the |
28 // created shortcut. | 28 // created shortcut. |
29 base::FilePath CreateShortcutInWebAppDir(const base::FilePath& web_app_path, | 29 base::FilePath CreateShortcutInWebAppDir( |
30 const ShortcutInfo& shortcut_info); | 30 const base::FilePath& web_app_path, |
| 31 scoped_ptr<ShortcutInfo> shortcut_info); |
31 | 32 |
32 // Update the relaunch details for the given app's window, making the taskbar | 33 // Update the relaunch details for the given app's window, making the taskbar |
33 // group's "Pin to the taskbar" button function correctly. | 34 // group's "Pin to the taskbar" button function correctly. |
34 void UpdateRelaunchDetailsForApp(Profile* profile, | 35 void UpdateRelaunchDetailsForApp(Profile* profile, |
35 const extensions::Extension* extension, | 36 const extensions::Extension* extension, |
36 HWND hwnd); | 37 HWND hwnd); |
37 | 38 |
38 namespace internals { | 39 namespace internals { |
39 | 40 |
40 // Saves |image| to |icon_file| if the file is outdated. Returns true if | 41 // Saves |image| to |icon_file| if the file is outdated. Returns true if |
41 // icon_file is up to date or successfully updated. | 42 // icon_file is up to date or successfully updated. |
42 // If |refresh_shell_icon_cache| is true, the shell's icon cache will be | 43 // If |refresh_shell_icon_cache| is true, the shell's icon cache will be |
43 // refreshed, ensuring the correct icon is displayed, but causing a flicker. | 44 // refreshed, ensuring the correct icon is displayed, but causing a flicker. |
44 // Refreshing the icon cache is not necessary on shortcut creation as the shell | 45 // Refreshing the icon cache is not necessary on shortcut creation as the shell |
45 // will be notified when the shortcut is created. | 46 // will be notified when the shortcut is created. |
46 bool CheckAndSaveIcon(const base::FilePath& icon_file, | 47 bool CheckAndSaveIcon(const base::FilePath& icon_file, |
47 const gfx::ImageFamily& image, | 48 const gfx::ImageFamily& image, |
48 bool refresh_shell_icon_cache); | 49 bool refresh_shell_icon_cache); |
49 | 50 |
50 base::FilePath GetIconFilePath(const base::FilePath& web_app_path, | 51 base::FilePath GetIconFilePath(const base::FilePath& web_app_path, |
51 const base::string16& title); | 52 const base::string16& title); |
52 | 53 |
53 } // namespace internals | 54 } // namespace internals |
54 | 55 |
55 } // namespace web_app | 56 } // namespace web_app |
56 | 57 |
57 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_WIN_H_ | 58 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_WIN_H_ |
OLD | NEW |