Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: chrome/browser/web_applications/web_app_win.h

Issue 2721553002: Make web_app::ShortcutInfo RefCountedThreadSafe (1) (Closed)
Patch Set: TestBrowserThreadBundle for mac test fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 extensions { 13 namespace extensions {
14 class Extension; 14 class Extension;
15 } 15 }
16 16
17 namespace gfx { 17 namespace gfx {
18 class ImageFamily; 18 class ImageFamily;
19 } 19 }
20 20
21 namespace web_app { 21 namespace web_app {
22 22
23 // Create a shortcut in the given web app data dir, returning the name of the 23 // Create a shortcut in the given web app data dir, returning the name of the
24 // created shortcut. 24 // created shortcut.
25 base::FilePath CreateShortcutInWebAppDir( 25 base::FilePath CreateShortcutInWebAppDir(
26 const base::FilePath& web_app_path, 26 const base::FilePath& web_app_path,
27 std::unique_ptr<ShortcutInfo> shortcut_info); 27 scoped_refptr<ShortcutInfo> shortcut_info);
28 28
29 // Update the relaunch details for the given app's window, making the taskbar 29 // Update the relaunch details for the given app's window, making the taskbar
30 // group's "Pin to the taskbar" button function correctly. 30 // group's "Pin to the taskbar" button function correctly.
31 void UpdateRelaunchDetailsForApp(Profile* profile, 31 void UpdateRelaunchDetailsForApp(Profile* profile,
32 const extensions::Extension* extension, 32 const extensions::Extension* extension,
33 HWND hwnd); 33 HWND hwnd);
34 34
35 namespace internals { 35 namespace internals {
36 36
37 // Saves |image| to |icon_file| if the file is outdated. Returns true if 37 // Saves |image| to |icon_file| if the file is outdated. Returns true if
38 // icon_file is up to date or successfully updated. 38 // icon_file is up to date or successfully updated.
39 // If |refresh_shell_icon_cache| is true, the shell's icon cache will be 39 // If |refresh_shell_icon_cache| is true, the shell's icon cache will be
40 // refreshed, ensuring the correct icon is displayed, but causing a flicker. 40 // refreshed, ensuring the correct icon is displayed, but causing a flicker.
41 // Refreshing the icon cache is not necessary on shortcut creation as the shell 41 // Refreshing the icon cache is not necessary on shortcut creation as the shell
42 // will be notified when the shortcut is created. 42 // will be notified when the shortcut is created.
43 bool CheckAndSaveIcon(const base::FilePath& icon_file, 43 bool CheckAndSaveIcon(const base::FilePath& icon_file,
44 const gfx::ImageFamily& image, 44 const gfx::ImageFamily& image,
45 bool refresh_shell_icon_cache); 45 bool refresh_shell_icon_cache);
46 46
47 base::FilePath GetIconFilePath(const base::FilePath& web_app_path, 47 base::FilePath GetIconFilePath(const base::FilePath& web_app_path,
48 const base::string16& title); 48 const base::string16& title);
49 49
50 } // namespace internals 50 } // namespace internals
51 51
52 } // namespace web_app 52 } // namespace web_app
53 53
54 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_WIN_H_ 54 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698