OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
11 #include "chrome/browser/tabs/tab_strip_selection_model.h" | 11 #include "chrome/browser/tabs/tab_strip_selection_model.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 13 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
14 #include "chrome/browser/ui/view_ids.h" | 14 #include "chrome/browser/ui/view_ids.h" |
15 #include "chrome/browser/ui/views/tabs/tab_controller.h" | 15 #include "chrome/browser/ui/views/tabs/tab_controller.h" |
16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
18 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
19 #include "grit/theme_resources_standard.h" | 19 #include "grit/theme_resources_standard.h" |
20 #include "grit/ui_resources.h" | 20 #include "grit/ui_resources.h" |
21 #include "ui/base/accessibility/accessible_view_state.h" | 21 #include "ui/base/accessibility/accessible_view_state.h" |
22 #include "ui/base/animation/animation_container.h" | 22 #include "ui/base/animation/animation_container.h" |
23 #include "ui/base/animation/slide_animation.h" | 23 #include "ui/base/animation/slide_animation.h" |
24 #include "ui/base/animation/throb_animation.h" | 24 #include "ui/base/animation/throb_animation.h" |
25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
26 #include "ui/base/resource/resource_bundle.h" | 26 #include "ui/base/resource/resource_bundle.h" |
27 #include "ui/base/text/text_elider.h" | 27 #include "ui/base/text/text_elider.h" |
28 #include "ui/base/theme_provider.h" | 28 #include "ui/base/theme_provider.h" |
29 #include "ui/gfx/canvas_skia.h" | 29 #include "ui/gfx/canvas.h" |
30 #include "ui/gfx/favicon_size.h" | 30 #include "ui/gfx/favicon_size.h" |
31 #include "ui/gfx/font.h" | 31 #include "ui/gfx/font.h" |
32 #include "ui/views/controls/button/image_button.h" | 32 #include "ui/views/controls/button/image_button.h" |
33 | 33 |
34 // How long the pulse throb takes. | 34 // How long the pulse throb takes. |
35 static const int kPulseDurationMs = 200; | 35 static const int kPulseDurationMs = 200; |
36 | 36 |
37 // How long the hover state takes. | 37 // How long the hover state takes. |
38 static const int kHoverDurationMs = 400; | 38 static const int kHoverDurationMs = 400; |
39 | 39 |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 // static | 572 // static |
573 void BaseTab::InitResources() { | 573 void BaseTab::InitResources() { |
574 static bool initialized = false; | 574 static bool initialized = false; |
575 if (!initialized) { | 575 if (!initialized) { |
576 initialized = true; | 576 initialized = true; |
577 font_ = new gfx::Font( | 577 font_ = new gfx::Font( |
578 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); | 578 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); |
579 font_height_ = font_->GetHeight(); | 579 font_height_ = font_->GetHeight(); |
580 } | 580 } |
581 } | 581 } |
OLD | NEW |