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