| 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 #include "chrome/browser/shell_integration.h" | 5 #include "chrome/browser/shell_integration.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 using content::BrowserThread; | 31 using content::BrowserThread; |
| 32 | 32 |
| 33 ShellIntegration::DefaultWebClientSetPermission | 33 ShellIntegration::DefaultWebClientSetPermission |
| 34 ShellIntegration::CanSetAsDefaultProtocolClient() { | 34 ShellIntegration::CanSetAsDefaultProtocolClient() { |
| 35 // Allowed as long as the browser can become the operating system default | 35 // Allowed as long as the browser can become the operating system default |
| 36 // browser. | 36 // browser. |
| 37 return CanSetAsDefaultBrowser(); | 37 return CanSetAsDefaultBrowser(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 ShellIntegration::ShortcutInfo::ShortcutInfo() | |
| 41 : is_platform_app(false) { | |
| 42 } | |
| 43 | |
| 44 ShellIntegration::ShortcutInfo::~ShortcutInfo() {} | |
| 45 | |
| 46 ShellIntegration::ShortcutLocations::ShortcutLocations() | |
| 47 : on_desktop(false), | |
| 48 applications_menu_location(APP_MENU_LOCATION_NONE), | |
| 49 in_quick_launch_bar(false) | |
| 50 #if defined(OS_POSIX) | |
| 51 , hidden(false) | |
| 52 #endif | |
| 53 { | |
| 54 } | |
| 55 | |
| 56 static const struct ShellIntegration::AppModeInfo* gAppModeInfo = NULL; | 40 static const struct ShellIntegration::AppModeInfo* gAppModeInfo = NULL; |
| 57 | 41 |
| 58 // static | 42 // static |
| 59 void ShellIntegration::SetAppModeInfo(const struct AppModeInfo* info) { | 43 void ShellIntegration::SetAppModeInfo(const struct AppModeInfo* info) { |
| 60 gAppModeInfo = info; | 44 gAppModeInfo = info; |
| 61 } | 45 } |
| 62 | 46 |
| 63 // static | 47 // static |
| 64 const struct ShellIntegration::AppModeInfo* ShellIntegration::AppModeInfo() { | 48 const struct ShellIntegration::AppModeInfo* ShellIntegration::AppModeInfo() { |
| 65 return gAppModeInfo; | 49 return gAppModeInfo; |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 case ShellIntegration::SET_DEFAULT_INTERACTIVE: | 308 case ShellIntegration::SET_DEFAULT_INTERACTIVE: |
| 325 if (interactive_permitted) { | 309 if (interactive_permitted) { |
| 326 result = ShellIntegration::SetAsDefaultProtocolClientInteractive( | 310 result = ShellIntegration::SetAsDefaultProtocolClientInteractive( |
| 327 protocol_); | 311 protocol_); |
| 328 } | 312 } |
| 329 break; | 313 break; |
| 330 } | 314 } |
| 331 | 315 |
| 332 return result; | 316 return result; |
| 333 } | 317 } |
| OLD | NEW |