| 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 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_ | 5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_ | 
| 6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ | 6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" | 
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 85 | 85 | 
| 86   // Returns true if Firefox is likely to be the default browser for the current | 86   // Returns true if Firefox is likely to be the default browser for the current | 
| 87   // user. This method is very fast so it can be invoked in the UI thread. | 87   // user. This method is very fast so it can be invoked in the UI thread. | 
| 88   static bool IsFirefoxDefaultBrowser(); | 88   static bool IsFirefoxDefaultBrowser(); | 
| 89 | 89 | 
| 90   // Attempt to determine if this instance of Chrome is the default client | 90   // Attempt to determine if this instance of Chrome is the default client | 
| 91   // application for the given protocol and return the appropriate state. | 91   // application for the given protocol and return the appropriate state. | 
| 92   static DefaultWebClientState | 92   static DefaultWebClientState | 
| 93       IsDefaultProtocolClient(const std::string& protocol); | 93       IsDefaultProtocolClient(const std::string& protocol); | 
| 94 | 94 | 
| 95   struct ShortcutInfo { |  | 
| 96     ShortcutInfo(); |  | 
| 97     ~ShortcutInfo(); |  | 
| 98 |  | 
| 99     GURL url; |  | 
| 100     // If |extension_id| is non-empty, this is short cut is to an extension-app |  | 
| 101     // and the launch url will be detected at start-up. In this case, |url| |  | 
| 102     // is still used to generate the app id (windows app id, not chrome app id). |  | 
| 103     std::string extension_id; |  | 
| 104     bool is_platform_app; |  | 
| 105     base::string16 title; |  | 
| 106     base::string16 description; |  | 
| 107     base::FilePath extension_path; |  | 
| 108     gfx::ImageFamily favicon; |  | 
| 109     base::FilePath profile_path; |  | 
| 110     std::string profile_name; |  | 
| 111   }; |  | 
| 112 |  | 
| 113   // This specifies a folder in the system applications menu (e.g the Start Menu |  | 
| 114   // on Windows). |  | 
| 115   // |  | 
| 116   // These represent the applications menu root, the "Google Chrome" folder and |  | 
| 117   // the "Chrome Apps" folder respectively. |  | 
| 118   // |  | 
| 119   // NB: On Linux, these locations may not be used by the window manager (e.g |  | 
| 120   // Unity and Gnome Shell). |  | 
| 121   enum ApplicationsMenuLocation { |  | 
| 122     APP_MENU_LOCATION_NONE, |  | 
| 123     APP_MENU_LOCATION_ROOT, |  | 
| 124     APP_MENU_LOCATION_SUBDIR_CHROME, |  | 
| 125     APP_MENU_LOCATION_SUBDIR_CHROMEAPPS, |  | 
| 126   }; |  | 
| 127 |  | 
| 128   // Info about which locations to create app shortcuts in. |  | 
| 129   struct ShortcutLocations { |  | 
| 130     ShortcutLocations(); |  | 
| 131 |  | 
| 132     bool on_desktop; |  | 
| 133 |  | 
| 134     ApplicationsMenuLocation applications_menu_location; |  | 
| 135 |  | 
| 136     // For Windows, this refers to quick launch bar prior to Win7. In Win7, |  | 
| 137     // this means "pin to taskbar". For Mac/Linux, this could be used for |  | 
| 138     // Mac dock or the gnome/kde application launcher. However, those are not |  | 
| 139     // implemented yet. |  | 
| 140     bool in_quick_launch_bar; |  | 
| 141 |  | 
| 142 #if defined(OS_POSIX) |  | 
| 143     // For Linux, this refers to a shortcut which the system knows about (for |  | 
| 144     // the purpose of identifying windows and giving them the correct |  | 
| 145     // title/icon), but which does not show up in menus or search results. |  | 
| 146     // Ignored if applications_menu_location is not APP_MENU_LOCATION_NONE. |  | 
| 147     bool hidden; |  | 
| 148 #endif |  | 
| 149   }; |  | 
| 150 |  | 
| 151   // Data that needs to be passed between the app launcher stub and Chrome. | 95   // Data that needs to be passed between the app launcher stub and Chrome. | 
| 152   struct AppModeInfo { | 96   struct AppModeInfo { | 
| 153   }; | 97   }; | 
| 154   static void SetAppModeInfo(const AppModeInfo* info); | 98   static void SetAppModeInfo(const AppModeInfo* info); | 
| 155   static const AppModeInfo* AppModeInfo(); | 99   static const AppModeInfo* AppModeInfo(); | 
| 156 | 100 | 
| 157   // Is the current instance of Chrome running in App mode. | 101   // Is the current instance of Chrome running in App mode. | 
| 158   bool IsRunningInAppMode(); | 102   bool IsRunningInAppMode(); | 
| 159 | 103 | 
| 160   // Set up command line arguments for launching a URL or an app. | 104   // Set up command line arguments for launching a URL or an app. | 
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 363     // Set Chrome as the default handler for this protocol. | 307     // Set Chrome as the default handler for this protocol. | 
| 364     virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; | 308     virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; | 
| 365 | 309 | 
| 366     std::string protocol_; | 310     std::string protocol_; | 
| 367 | 311 | 
| 368     DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); | 312     DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); | 
| 369   }; | 313   }; | 
| 370 }; | 314 }; | 
| 371 | 315 | 
| 372 #endif  // CHROME_BROWSER_SHELL_INTEGRATION_H_ | 316 #endif  // CHROME_BROWSER_SHELL_INTEGRATION_H_ | 
| OLD | NEW | 
|---|