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

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

Issue 732203002: [Extensions Toolbar] Properly render newly-added extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm » ('j') | 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 [containerView_ frame]; 492 [containerView_ frame];
493 493
494 [self showChevronIfNecessaryInFrame:frame animate:animate]; 494 [self showChevronIfNecessaryInFrame:frame animate:animate];
495 495
496 [containerView_ setNeedsDisplay:YES]; 496 [containerView_ setNeedsDisplay:YES];
497 497
498 if (!animate) { 498 if (!animate) {
499 [[NSNotificationCenter defaultCenter] 499 [[NSNotificationCenter defaultCenter]
500 postNotificationName:kBrowserActionVisibilityChangedNotification 500 postNotificationName:kBrowserActionVisibilityChangedNotification
501 object:self]; 501 object:self];
502 [self redraw];
503 } 502 }
503 [self redraw];
504 } 504 }
505 505
506 - (BOOL)updateContainerVisibility { 506 - (BOOL)updateContainerVisibility {
507 BOOL hidden = [buttons_ count] == 0; 507 BOOL hidden = [buttons_ count] == 0;
508 if ([containerView_ isHidden] != hidden) 508 if ([containerView_ isHidden] != hidden)
509 [containerView_ setHidden:hidden]; 509 [containerView_ setHidden:hidden];
510 return !hidden; 510 return !hidden;
511 } 511 }
512 512
513 - (void)updateButtonOpacity { 513 - (void)updateButtonOpacity {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 754
755 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index { 755 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index {
756 const std::vector<ToolbarActionViewController*>& toolbar_actions = 756 const std::vector<ToolbarActionViewController*>& toolbar_actions =
757 toolbarActionsBar_->toolbar_actions(); 757 toolbarActionsBar_->toolbar_actions();
758 if (index < toolbar_actions.size()) 758 if (index < toolbar_actions.size())
759 return [self buttonForId:toolbar_actions[index]->GetId()]; 759 return [self buttonForId:toolbar_actions[index]->GetId()];
760 return nil; 760 return nil;
761 } 761 }
762 762
763 @end 763 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698