OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/views/toolbar_view.h" | 5 #include "chrome/browser/views/toolbar_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 AddChildView(back_); | 171 AddChildView(back_); |
172 AddChildView(forward_); | 172 AddChildView(forward_); |
173 AddChildView(reload_); | 173 AddChildView(reload_); |
174 AddChildView(home_); | 174 AddChildView(home_); |
175 AddChildView(location_bar_); | 175 AddChildView(location_bar_); |
176 AddChildView(browser_actions_); | 176 AddChildView(browser_actions_); |
177 AddChildView(app_menu_); | 177 AddChildView(app_menu_); |
178 | 178 |
179 location_bar_->Init(); | 179 location_bar_->Init(); |
180 show_home_button_.Init(prefs::kShowHomeButton, profile->GetPrefs(), this); | 180 show_home_button_.Init(prefs::kShowHomeButton, profile->GetPrefs(), this); |
| 181 browser_actions_->Init(); |
181 | 182 |
182 SetProfile(profile); | 183 SetProfile(profile); |
183 } | 184 } |
184 | 185 |
185 void ToolbarView::SetProfile(Profile* profile) { | 186 void ToolbarView::SetProfile(Profile* profile) { |
186 if (profile != profile_) { | 187 if (profile != profile_) { |
187 profile_ = profile; | 188 profile_ = profile; |
188 location_bar_->SetProfile(profile); | 189 location_bar_->SetProfile(profile); |
189 } | 190 } |
190 } | 191 } |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 *tp->GetBitmapNamed(IDR_UPGRADE_DOT_ACTIVE), | 635 *tp->GetBitmapNamed(IDR_UPGRADE_DOT_ACTIVE), |
635 value); | 636 value); |
636 } | 637 } |
637 | 638 |
638 static const int kBadgeLeftSpacing = 8; | 639 static const int kBadgeLeftSpacing = 8; |
639 static const int kBadgeTopSpacing = 18; | 640 static const int kBadgeTopSpacing = 18; |
640 canvas->DrawBitmapInt(badge, kBadgeLeftSpacing, kBadgeTopSpacing); | 641 canvas->DrawBitmapInt(badge, kBadgeLeftSpacing, kBadgeTopSpacing); |
641 | 642 |
642 return canvas->ExtractBitmap(); | 643 return canvas->ExtractBitmap(); |
643 } | 644 } |
OLD | NEW |