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/tabs/tab.h" | 5 #include "chrome/browser/views/tabs/tab.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "app/multi_animation.h" | 9 #include "app/multi_animation.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 // Certain UI elements within the Tab (the favicon, etc.) are not represented | 312 // Certain UI elements within the Tab (the favicon, etc.) are not represented |
313 // as child Views (which is the preferred method). Instead, these UI elements | 313 // as child Views (which is the preferred method). Instead, these UI elements |
314 // are drawn directly on the canvas from within Tab::Paint(). The Tab's child | 314 // are drawn directly on the canvas from within Tab::Paint(). The Tab's child |
315 // Views (for example, the Tab's close button which is a views::Button | 315 // Views (for example, the Tab's close button which is a views::Button |
316 // instance) are automatically mirrored by the mirroring infrastructure in | 316 // instance) are automatically mirrored by the mirroring infrastructure in |
317 // views. The elements Tab draws directly on the canvas need to be manually | 317 // views. The elements Tab draws directly on the canvas need to be manually |
318 // mirrored if the View's layout is right-to-left. | 318 // mirrored if the View's layout is right-to-left. |
319 title_bounds_.set_x(MirroredLeftPointForRect(title_bounds_)); | 319 title_bounds_.set_x(MirroredLeftPointForRect(title_bounds_)); |
320 } | 320 } |
321 | 321 |
322 void Tab::ThemeChanged() { | 322 void Tab::OnThemeChanged() { |
323 BaseTab::ThemeChanged(); | |
324 Tab::LoadTabImages(); | 323 Tab::LoadTabImages(); |
325 } | 324 } |
326 | 325 |
327 bool Tab::HasHitTestMask() const { | 326 bool Tab::HasHitTestMask() const { |
328 return true; | 327 return true; |
329 } | 328 } |
330 | 329 |
331 void Tab::GetHitTestMask(gfx::Path* path) const { | 330 void Tab::GetHitTestMask(gfx::Path* path) const { |
332 DCHECK(path); | 331 DCHECK(path); |
333 | 332 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 tab_active.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT); | 603 tab_active.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT); |
605 tab_active.l_width = tab_active.image_l->width(); | 604 tab_active.l_width = tab_active.image_l->width(); |
606 tab_active.r_width = tab_active.image_r->width(); | 605 tab_active.r_width = tab_active.image_r->width(); |
607 | 606 |
608 tab_inactive.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT); | 607 tab_inactive.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT); |
609 tab_inactive.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER); | 608 tab_inactive.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER); |
610 tab_inactive.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT); | 609 tab_inactive.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT); |
611 tab_inactive.l_width = tab_inactive.image_l->width(); | 610 tab_inactive.l_width = tab_inactive.image_l->width(); |
612 tab_inactive.r_width = tab_inactive.image_r->width(); | 611 tab_inactive.r_width = tab_inactive.image_r->width(); |
613 } | 612 } |
OLD | NEW |