| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/tabs/base_tab.h" | 5 #include "chrome/browser/ui/views/tabs/base_tab.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 : controller_(controller), | 147 : controller_(controller), |
| 148 closing_(false), | 148 closing_(false), |
| 149 dragging_(false), | 149 dragging_(false), |
| 150 favicon_hiding_offset_(0), | 150 favicon_hiding_offset_(0), |
| 151 loading_animation_frame_(0), | 151 loading_animation_frame_(0), |
| 152 should_display_crashed_favicon_(false), | 152 should_display_crashed_favicon_(false), |
| 153 throbber_disabled_(false), | 153 throbber_disabled_(false), |
| 154 theme_provider_(NULL) { | 154 theme_provider_(NULL) { |
| 155 BaseTab::InitResources(); | 155 BaseTab::InitResources(); |
| 156 | 156 |
| 157 SetID(VIEW_ID_TAB); | 157 set_id(VIEW_ID_TAB); |
| 158 | 158 |
| 159 // Add the Close Button. | 159 // Add the Close Button. |
| 160 close_button_ = new TabCloseButton(this); | 160 close_button_ = new TabCloseButton(this); |
| 161 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 161 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 162 close_button_->SetImage(views::CustomButton::BS_NORMAL, | 162 close_button_->SetImage(views::CustomButton::BS_NORMAL, |
| 163 rb.GetBitmapNamed(IDR_TAB_CLOSE)); | 163 rb.GetBitmapNamed(IDR_TAB_CLOSE)); |
| 164 close_button_->SetImage(views::CustomButton::BS_HOT, | 164 close_button_->SetImage(views::CustomButton::BS_HOT, |
| 165 rb.GetBitmapNamed(IDR_TAB_CLOSE_H)); | 165 rb.GetBitmapNamed(IDR_TAB_CLOSE_H)); |
| 166 close_button_->SetImage(views::CustomButton::BS_PUSHED, | 166 close_button_->SetImage(views::CustomButton::BS_PUSHED, |
| 167 rb.GetBitmapNamed(IDR_TAB_CLOSE_P)); | 167 rb.GetBitmapNamed(IDR_TAB_CLOSE_P)); |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 // static | 591 // static |
| 592 void BaseTab::InitResources() { | 592 void BaseTab::InitResources() { |
| 593 static bool initialized = false; | 593 static bool initialized = false; |
| 594 if (!initialized) { | 594 if (!initialized) { |
| 595 initialized = true; | 595 initialized = true; |
| 596 font_ = new gfx::Font( | 596 font_ = new gfx::Font( |
| 597 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); | 597 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); |
| 598 font_height_ = font_->GetHeight(); | 598 font_height_ = font_->GetHeight(); |
| 599 } | 599 } |
| 600 } | 600 } |
| OLD | NEW |