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 "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" | 5 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 630 |
631 - (void)containerFrameChanged:(NSNotification*)notification { | 631 - (void)containerFrameChanged:(NSNotification*)notification { |
632 [self updateButtonOpacity]; | 632 [self updateButtonOpacity]; |
633 [[containerView_ window] invalidateCursorRectsForView:containerView_]; | 633 [[containerView_ window] invalidateCursorRectsForView:containerView_]; |
634 [self updateChevronPositionInFrame:[containerView_ frame]]; | 634 [self updateChevronPositionInFrame:[containerView_ frame]]; |
635 } | 635 } |
636 | 636 |
637 - (void)containerDragStart:(NSNotification*)notification { | 637 - (void)containerDragStart:(NSNotification*)notification { |
638 [self setChevronHidden:YES inFrame:[containerView_ frame] animate:YES]; | 638 [self setChevronHidden:YES inFrame:[containerView_ frame] animate:YES]; |
639 while([hiddenButtons_ count] > 0) { | 639 while([hiddenButtons_ count] > 0) { |
640 [containerView_ addSubview:[hiddenButtons_ objectAtIndex:0]]; | 640 BrowserActionButton* button = [hiddenButtons_ objectAtIndex:0]; |
| 641 [button setAlphaValue:1.0]; |
| 642 [containerView_ addSubview:button]; |
641 [hiddenButtons_ removeObjectAtIndex:0]; | 643 [hiddenButtons_ removeObjectAtIndex:0]; |
642 } | 644 } |
643 } | 645 } |
644 | 646 |
645 - (void)containerDragging:(NSNotification*)notification { | 647 - (void)containerDragging:(NSNotification*)notification { |
646 [[NSNotificationCenter defaultCenter] | 648 [[NSNotificationCenter defaultCenter] |
647 postNotificationName:kBrowserActionGrippyDraggingNotification | 649 postNotificationName:kBrowserActionGrippyDraggingNotification |
648 object:self]; | 650 object:self]; |
649 } | 651 } |
650 | 652 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 const extensions::ExtensionList& toolbar_items = | 858 const extensions::ExtensionList& toolbar_items = |
857 toolbarModel_->toolbar_items(); | 859 toolbarModel_->toolbar_items(); |
858 if (index < toolbar_items.size()) { | 860 if (index < toolbar_items.size()) { |
859 const Extension* extension = toolbar_items[index].get(); | 861 const Extension* extension = toolbar_items[index].get(); |
860 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; | 862 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; |
861 } | 863 } |
862 return nil; | 864 return nil; |
863 } | 865 } |
864 | 866 |
865 @end | 867 @end |
OLD | NEW |