| 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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 [containerView_ setMaxDesiredWidth:toolbarActionsBar_->GetMaximumWidth()]; | 556 [containerView_ setMaxDesiredWidth:toolbarActionsBar_->GetMaximumWidth()]; |
| 557 } | 557 } |
| 558 | 558 |
| 559 - (void)redraw { | 559 - (void)redraw { |
| 560 if (![self updateContainerVisibility]) | 560 if (![self updateContainerVisibility]) |
| 561 return; // Container is hidden; no need to update. | 561 return; // Container is hidden; no need to update. |
| 562 | 562 |
| 563 scoped_ptr<ui::NinePartImageIds> highlight; | 563 scoped_ptr<ui::NinePartImageIds> highlight; |
| 564 if (toolbarActionsBar_->is_highlighting()) { | 564 if (toolbarActionsBar_->is_highlighting()) { |
| 565 if (toolbarActionsBar_->highlight_type() == | 565 if (toolbarActionsBar_->highlight_type() == |
| 566 extensions::ExtensionToolbarModel::HIGHLIGHT_INFO) | 566 ToolbarActionsModel::HIGHLIGHT_INFO) |
| 567 highlight.reset( | 567 highlight.reset( |
| 568 new ui::NinePartImageIds(IMAGE_GRID(IDR_TOOLBAR_ACTION_HIGHLIGHT))); | 568 new ui::NinePartImageIds(IMAGE_GRID(IDR_TOOLBAR_ACTION_HIGHLIGHT))); |
| 569 else | 569 else |
| 570 highlight.reset( | 570 highlight.reset( |
| 571 new ui::NinePartImageIds(IMAGE_GRID(IDR_DEVELOPER_MODE_HIGHLIGHT))); | 571 new ui::NinePartImageIds(IMAGE_GRID(IDR_DEVELOPER_MODE_HIGHLIGHT))); |
| 572 } | 572 } |
| 573 [containerView_ setHighlight:highlight.Pass()]; | 573 [containerView_ setHighlight:highlight.Pass()]; |
| 574 | 574 |
| 575 std::vector<ToolbarActionViewController*> toolbar_actions = | 575 std::vector<ToolbarActionViewController*> toolbar_actions = |
| 576 toolbarActionsBar_->GetActions(); | 576 toolbarActionsBar_->GetActions(); |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 #pragma mark - | 1062 #pragma mark - |
| 1063 #pragma mark Testing Methods | 1063 #pragma mark Testing Methods |
| 1064 | 1064 |
| 1065 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index { | 1065 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index { |
| 1066 return index < [buttons_ count] ? [buttons_ objectAtIndex:index] : nil; | 1066 return index < [buttons_ count] ? [buttons_ objectAtIndex:index] : nil; |
| 1067 } | 1067 } |
| 1068 | 1068 |
| 1069 @end | 1069 @end |
| OLD | NEW |