| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "chrome/browser/extensions/extension_message_bubble_controller.h" | 10 #include "chrome/browser/extensions/extension_message_bubble_controller.h" |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 - (void)showChevronIfNecessaryInFrame:(NSRect)frame { | 933 - (void)showChevronIfNecessaryInFrame:(NSRect)frame { |
| 934 if (!toolbarActionsBar_->platform_settings().chevron_enabled) | 934 if (!toolbarActionsBar_->platform_settings().chevron_enabled) |
| 935 return; | 935 return; |
| 936 bool hidden = suppressChevron_ || | 936 bool hidden = suppressChevron_ || |
| 937 toolbarActionsBar_->GetIconCount() == [self buttonCount]; | 937 toolbarActionsBar_->GetIconCount() == [self buttonCount]; |
| 938 [self setChevronHidden:hidden inFrame:frame]; | 938 [self setChevronHidden:hidden inFrame:frame]; |
| 939 } | 939 } |
| 940 | 940 |
| 941 - (void)updateChevronPositionInFrame:(NSRect)frame { | 941 - (void)updateChevronPositionInFrame:(NSRect)frame { |
| 942 CGFloat xPos = NSWidth(frame) - kChevronWidth - | 942 CGFloat xPos = NSWidth(frame) - kChevronWidth - |
| 943 toolbarActionsBar_->platform_settings().right_padding; | 943 toolbarActionsBar_->platform_settings().item_spacing; |
| 944 NSRect buttonFrame = NSMakeRect(xPos, | 944 NSRect buttonFrame = NSMakeRect(xPos, |
| 945 0, | 945 0, |
| 946 kChevronWidth, | 946 kChevronWidth, |
| 947 ToolbarActionsBar::IconHeight()); | 947 ToolbarActionsBar::IconHeight()); |
| 948 [chevronAnimation_ stopAnimation]; | 948 [chevronAnimation_ stopAnimation]; |
| 949 [chevronMenuButton_ setFrame:buttonFrame]; | 949 [chevronMenuButton_ setFrame:buttonFrame]; |
| 950 } | 950 } |
| 951 | 951 |
| 952 - (void)setChevronHidden:(BOOL)hidden | 952 - (void)setChevronHidden:(BOOL)hidden |
| 953 inFrame:(NSRect)frame { | 953 inFrame:(NSRect)frame { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 } | 1050 } |
| 1051 | 1051 |
| 1052 #pragma mark - | 1052 #pragma mark - |
| 1053 #pragma mark Testing Methods | 1053 #pragma mark Testing Methods |
| 1054 | 1054 |
| 1055 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index { | 1055 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index { |
| 1056 return index < [buttons_ count] ? [buttons_ objectAtIndex:index] : nil; | 1056 return index < [buttons_ count] ? [buttons_ objectAtIndex:index] : nil; |
| 1057 } | 1057 } |
| 1058 | 1058 |
| 1059 @end | 1059 @end |
| OLD | NEW |