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

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

Issue 9310079: Moved app shortcut code out of ExtensionService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed stupid virtual ommission Created 8 years, 10 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 (c) 2011 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 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ 5 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ 6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 22 matching lines...) Expand all
33 33
34 // Creates a shortcut for web application based on given shortcut data. 34 // Creates a shortcut for web application based on given shortcut data.
35 // |profile_path| is used as root directory for persisted data such as icon. 35 // |profile_path| is used as root directory for persisted data such as icon.
36 // Directory layout is similar to what Gears has, i.e. an web application's 36 // Directory layout is similar to what Gears has, i.e. an web application's
37 // file is stored under "#/host_name/scheme_port", where '#' is the 37 // file is stored under "#/host_name/scheme_port", where '#' is the
38 // |root_dir|. A crx based app uses a directory named _crx_<app id>. 38 // |root_dir|. A crx based app uses a directory named _crx_<app id>.
39 void CreateShortcut( 39 void CreateShortcut(
40 const FilePath& profile_path, 40 const FilePath& profile_path,
41 const ShellIntegration::ShortcutInfo& shortcut_info); 41 const ShellIntegration::ShortcutInfo& shortcut_info);
42 42
43 // Allow tests to disable shortcut creation.
44 void SetDisableShortcutCreationForTests(bool disable);
45
46 // Returns true if given url is a valid web app url. 43 // Returns true if given url is a valid web app url.
47 bool IsValidUrl(const GURL& url); 44 bool IsValidUrl(const GURL& url);
48 45
49 // Returns data dir for web apps for given profile path. 46 // Returns data dir for web apps for given profile path.
50 FilePath GetDataDir(const FilePath& profile_path); 47 FilePath GetDataDir(const FilePath& profile_path);
51 48
52 #if defined(TOOLKIT_VIEWS) 49 #if defined(TOOLKIT_VIEWS)
53 // Extracts icons info from web app data. Take only square shaped icons and 50 // Extracts icons info from web app data. Take only square shaped icons and
54 // sort them from smallest to largest. 51 // sort them from smallest to largest.
55 typedef std::vector<WebApplicationInfo::IconInfo> IconInfoList; 52 typedef std::vector<WebApplicationInfo::IconInfo> IconInfoList;
(...skipping 16 matching lines...) Expand all
72 bool CheckAndSaveIcon(const FilePath& icon_file, const SkBitmap& image); 69 bool CheckAndSaveIcon(const FilePath& icon_file, const SkBitmap& image);
73 #endif 70 #endif
74 71
75 FilePath GetWebAppDataDirectory(const FilePath& root_dir, 72 FilePath GetWebAppDataDirectory(const FilePath& root_dir,
76 const ShellIntegration::ShortcutInfo& info); 73 const ShellIntegration::ShortcutInfo& info);
77 } // namespace internals 74 } // namespace internals
78 75
79 } // namespace web_app 76 } // namespace web_app
80 77
81 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ 78 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698