| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 AddChildView(back_); | 175 AddChildView(back_); |
| 176 AddChildView(forward_); | 176 AddChildView(forward_); |
| 177 AddChildView(reload_); | 177 AddChildView(reload_); |
| 178 AddChildView(home_); | 178 AddChildView(home_); |
| 179 AddChildView(location_bar_); | 179 AddChildView(location_bar_); |
| 180 AddChildView(browser_actions_); | 180 AddChildView(browser_actions_); |
| 181 AddChildView(app_menu_); | 181 AddChildView(app_menu_); |
| 182 | 182 |
| 183 location_bar_->Init(); | 183 location_bar_->Init(); |
| 184 show_home_button_.Init(prefs::kShowHomeButton, profile->GetPrefs(), this); | 184 show_home_button_.Init(prefs::kShowHomeButton, profile->GetPrefs(), this); |
| 185 browser_actions_->Init(); |
| 185 | 186 |
| 186 SetProfile(profile); | 187 SetProfile(profile); |
| 187 } | 188 } |
| 188 | 189 |
| 189 void ToolbarView::SetProfile(Profile* profile) { | 190 void ToolbarView::SetProfile(Profile* profile) { |
| 190 if (profile != profile_) { | 191 if (profile != profile_) { |
| 191 profile_ = profile; | 192 profile_ = profile; |
| 192 location_bar_->SetProfile(profile); | 193 location_bar_->SetProfile(profile); |
| 193 } | 194 } |
| 194 } | 195 } |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 *tp->GetBitmapNamed(IDR_UPGRADE_DOT_ACTIVE), | 655 *tp->GetBitmapNamed(IDR_UPGRADE_DOT_ACTIVE), |
| 655 value); | 656 value); |
| 656 } | 657 } |
| 657 | 658 |
| 658 static const int kBadgeLeftSpacing = 8; | 659 static const int kBadgeLeftSpacing = 8; |
| 659 static const int kBadgeTopSpacing = 18; | 660 static const int kBadgeTopSpacing = 18; |
| 660 canvas->DrawBitmapInt(badge, kBadgeLeftSpacing, kBadgeTopSpacing); | 661 canvas->DrawBitmapInt(badge, kBadgeLeftSpacing, kBadgeTopSpacing); |
| 661 | 662 |
| 662 return canvas->ExtractBitmap(); | 663 return canvas->ExtractBitmap(); |
| 663 } | 664 } |
| OLD | NEW |