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/tab.h" | 5 #include "chrome/browser/ui/views/tabs/tab.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/defaults.h" | 10 #include "chrome/browser/defaults.h" |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 return NULL; | 501 return NULL; |
502 } | 502 } |
503 | 503 |
504 if (!controller() || !controller()->IsInstantExtendedAPIEnabled()) | 504 if (!controller() || !controller()->IsInstantExtendedAPIEnabled()) |
505 return tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR); | 505 return tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR); |
506 | 506 |
507 switch (mode) { | 507 switch (mode) { |
508 case chrome::search::Mode::MODE_NTP: | 508 case chrome::search::Mode::MODE_NTP: |
509 return tp->GetImageSkiaNamed(IDR_THEME_NTP_BACKGROUND); | 509 return tp->GetImageSkiaNamed(IDR_THEME_NTP_BACKGROUND); |
510 | 510 |
511 case chrome::search::Mode::MODE_SEARCH: | 511 case chrome::search::Mode::MODE_SEARCH_SUGGESTIONS: |
| 512 case chrome::search::Mode::MODE_SEARCH_RESULTS: |
512 case chrome::search::Mode::MODE_DEFAULT: | 513 case chrome::search::Mode::MODE_DEFAULT: |
513 default: | 514 default: |
514 return tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR_SEARCH); | 515 return tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR_SEARCH); |
515 } | 516 } |
516 } | 517 } |
517 | 518 |
518 void Tab::PaintTabBackground(gfx::Canvas* canvas) { | 519 void Tab::PaintTabBackground(gfx::Canvas* canvas) { |
519 if (IsActive()) { | 520 if (IsActive()) { |
520 bool fading_in = false; | 521 bool fading_in = false; |
521 // If |gradient_background_opacity| < 1f, paint flat background at full | 522 // If |gradient_background_opacity| < 1f, paint flat background at full |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 rb.GetImageSkiaNamed(IDR_TAB_ACTIVE_RIGHT_SEARCH); | 815 rb.GetImageSkiaNamed(IDR_TAB_ACTIVE_RIGHT_SEARCH); |
815 tab_active_search_.l_width = tab_active_search_.image_l->width(); | 816 tab_active_search_.l_width = tab_active_search_.image_l->width(); |
816 tab_active_search_.r_width = tab_active_search_.image_r->width(); | 817 tab_active_search_.r_width = tab_active_search_.image_r->width(); |
817 | 818 |
818 tab_inactive_.image_l = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_LEFT); | 819 tab_inactive_.image_l = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_LEFT); |
819 tab_inactive_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER); | 820 tab_inactive_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER); |
820 tab_inactive_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT); | 821 tab_inactive_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT); |
821 tab_inactive_.l_width = tab_inactive_.image_l->width(); | 822 tab_inactive_.l_width = tab_inactive_.image_l->width(); |
822 tab_inactive_.r_width = tab_inactive_.image_r->width(); | 823 tab_inactive_.r_width = tab_inactive_.image_r->width(); |
823 } | 824 } |
OLD | NEW |