Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm

Issue 662593002: The extension icon on the far right is invisible when about to dragging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698