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 #import "browser_actions_controller.h" | 5 #import "browser_actions_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 if (effect == NSViewAnimationFadeInEffect) { | 433 if (effect == NSViewAnimationFadeInEffect) { |
434 return NO; | 434 return NO; |
435 } else if (effect == NSViewAnimationFadeOutEffect) { | 435 } else if (effect == NSViewAnimationFadeOutEffect) { |
436 return YES; | 436 return YES; |
437 } | 437 } |
438 | 438 |
439 NOTREACHED(); | 439 NOTREACHED(); |
440 return YES; | 440 return YES; |
441 } | 441 } |
442 | 442 |
443 + (void)registerUserPrefs:(PrefService*)prefs { | 443 + (void)registerUserPrefs:(PrefServiceSyncable*)prefs { |
444 prefs->RegisterDoublePref(prefs::kBrowserActionContainerWidth, | 444 prefs->RegisterDoublePref(prefs::kBrowserActionContainerWidth, |
445 0, | 445 0, |
446 PrefService::UNSYNCABLE_PREF); | 446 PrefServiceSyncable::UNSYNCABLE_PREF); |
447 } | 447 } |
448 | 448 |
449 #pragma mark - | 449 #pragma mark - |
450 #pragma mark NSMenuDelegate | 450 #pragma mark NSMenuDelegate |
451 | 451 |
452 - (void)menuNeedsUpdate:(NSMenu*)menu { | 452 - (void)menuNeedsUpdate:(NSMenu*)menu { |
453 [menu removeAllItems]; | 453 [menu removeAllItems]; |
454 | 454 |
455 // See menu_button.h for documentation on why this is needed. | 455 // See menu_button.h for documentation on why this is needed. |
456 [menu addItemWithTitle:@"" action:nil keyEquivalent:@""]; | 456 [menu addItemWithTitle:@"" action:nil keyEquivalent:@""]; |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 const extensions::ExtensionList& toolbar_items = | 869 const extensions::ExtensionList& toolbar_items = |
870 toolbarModel_->toolbar_items(); | 870 toolbarModel_->toolbar_items(); |
871 if (index < toolbar_items.size()) { | 871 if (index < toolbar_items.size()) { |
872 const Extension* extension = toolbar_items[index]; | 872 const Extension* extension = toolbar_items[index]; |
873 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; | 873 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; |
874 } | 874 } |
875 return nil; | 875 return nil; |
876 } | 876 } |
877 | 877 |
878 @end | 878 @end |
OLD | NEW |