OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "chrome/browser/cocoa/side_tabs_toolbar_controller.h" |
| 6 |
| 7 #include "base/nsimage_cache_mac.h" |
| 8 #import "chrome/browser/cocoa/autocomplete_text_field_cell.h" |
| 9 #include "chrome/browser/browser.h" |
| 10 #include "chrome/browser/profile.h" |
| 11 |
| 12 |
| 13 namespace { |
| 14 |
| 15 NSString* const kSearchButtonImageName = @"omnibox_search.pdf"; |
| 16 |
| 17 } |
| 18 |
| 19 @implementation SideTabsToolbarController |
| 20 |
| 21 - (id)initWithModel:(ToolbarModel*)model |
| 22 commands:(CommandUpdater*)commands |
| 23 profile:(Profile*)profile |
| 24 browser:(Browser*)browser |
| 25 resizeDelegate:(id<ViewResizer>)resizeDelegate { |
| 26 if ((self = [super initWithModel:model |
| 27 commands:commands |
| 28 profile:profile |
| 29 browser:browser |
| 30 resizeDelegate:resizeDelegate |
| 31 nibFileNamed:@"SideToolbar"])) { |
| 32 } |
| 33 return self; |
| 34 } |
| 35 |
| 36 - (void)awakeFromNib { |
| 37 [super awakeFromNib]; |
| 38 [goButton_ setImage:nsimage_cache::ImageNamed(kSearchButtonImageName)]; |
| 39 [[locationBar_ autocompleteTextFieldCell] setStarIconView:nil]; |
| 40 } |
| 41 |
| 42 - (void)showOptionalHomeButton { |
| 43 // Do nothing for side tabs. |
| 44 } |
| 45 |
| 46 - (void)setIsLoading:(BOOL)isLoading { |
| 47 if (isLoading) |
| 48 [loadingSpinner_ startAnimation:self]; |
| 49 else |
| 50 [loadingSpinner_ stopAnimation:self]; |
| 51 } |
| 52 |
| 53 @end |
OLD | NEW |