| 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/ui/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 : extensions::LAUNCH_TYPE_WINDOW; | 578 : extensions::LAUNCH_TYPE_WINDOW; |
| 579 profile->GetPrefs()->SetInteger( | 579 profile->GetPrefs()->SetInteger( |
| 580 extensions::pref_names::kBookmarkAppCreationLaunchType, launch_type); | 580 extensions::pref_names::kBookmarkAppCreationLaunchType, launch_type); |
| 581 extensions::SetLaunchType(service, extension_id, launch_type); | 581 extensions::SetLaunchType(service, extension_id, launch_type); |
| 582 | 582 |
| 583 // Update name of app. | 583 // Update name of app. |
| 584 NSString* new_title = [app_title stringValue]; | 584 NSString* new_title = [app_title stringValue]; |
| 585 if (![original_title isEqualToString:new_title]) { | 585 if (![original_title isEqualToString:new_title]) { |
| 586 WebApplicationInfo new_web_app_info(web_app_info); | 586 WebApplicationInfo new_web_app_info(web_app_info); |
| 587 new_web_app_info.title = base::SysNSStringToUTF16(new_title); | 587 new_web_app_info.title = base::SysNSStringToUTF16(new_title); |
| 588 extensions::CreateOrUpdateBookmarkApp(service, new_web_app_info); | 588 extensions::CreateOrUpdateBookmarkApp(service, &new_web_app_info); |
| 589 } | 589 } |
| 590 | 590 |
| 591 extensions::ExtensionRegistry* registry = | 591 extensions::ExtensionRegistry* registry = |
| 592 extensions::ExtensionRegistry::Get(profile); | 592 extensions::ExtensionRegistry::Get(profile); |
| 593 const extensions::Extension* app = registry->GetExtensionById( | 593 const extensions::Extension* app = registry->GetExtensionById( |
| 594 extension_id, extensions::ExtensionRegistry::ENABLED); | 594 extension_id, extensions::ExtensionRegistry::ENABLED); |
| 595 | 595 |
| 596 web_app::RevealAppShimInFinderForApp(profile, app); | 596 web_app::RevealAppShimInFinderForApp(profile, app); |
| 597 } else { | 597 } else { |
| 598 service->UninstallExtension(extension_id, | 598 service->UninstallExtension(extension_id, |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) | 807 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) |
| 808 return 0; | 808 return 0; |
| 809 return 40; | 809 return 40; |
| 810 } | 810 } |
| 811 | 811 |
| 812 void BrowserWindowCocoa::ExecuteExtensionCommand( | 812 void BrowserWindowCocoa::ExecuteExtensionCommand( |
| 813 const extensions::Extension* extension, | 813 const extensions::Extension* extension, |
| 814 const extensions::Command& command) { | 814 const extensions::Command& command) { |
| 815 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; | 815 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; |
| 816 } | 816 } |
| OLD | NEW |