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 "ui/app_list/views/app_list_background.h" | 5 #include "ui/app_list/views/app_list_background.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "third_party/skia/include/core/SkPaint.h" | 8 #include "third_party/skia/include/core/SkPaint.h" |
9 #include "third_party/skia/include/core/SkPath.h" | 9 #include "third_party/skia/include/core/SkPath.h" |
10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // Contents corner radius is 1px smaller than border corner radius. | 47 // Contents corner radius is 1px smaller than border corner radius. |
48 SkScalar radius = SkIntToScalar(corner_radius_ - 1); | 48 SkScalar radius = SkIntToScalar(corner_radius_ - 1); |
49 path.addRoundRect(gfx::RectToSkRect(bounds), radius, radius); | 49 path.addRoundRect(gfx::RectToSkRect(bounds), radius, radius); |
50 canvas->ClipPath(path, false); | 50 canvas->ClipPath(path, false); |
51 | 51 |
52 SkPaint paint; | 52 SkPaint paint; |
53 paint.setStyle(SkPaint::kFill_Style); | 53 paint.setStyle(SkPaint::kFill_Style); |
54 | 54 |
55 int contents_top = bounds.y(); | 55 int contents_top = bounds.y(); |
56 views::View* search_box_view = main_view_->search_box_view(); | 56 views::View* search_box_view = main_view_->search_box_view(); |
57 if (main_view_->visible() && search_box_view->visible()) { | 57 if (main_view_->visible() && search_box_view->visible() && |
| 58 !app_list::switches::IsExperimentalAppListEnabled()) { |
58 const gfx::Rect search_box_view_bounds = | 59 const gfx::Rect search_box_view_bounds = |
59 search_box_view->ConvertRectToWidget(search_box_view->GetLocalBounds()); | 60 search_box_view->ConvertRectToWidget(search_box_view->GetLocalBounds()); |
60 gfx::Rect search_box_rect(bounds.x(), | 61 gfx::Rect search_box_rect(bounds.x(), |
61 bounds.y(), | 62 bounds.y(), |
62 bounds.width(), | 63 bounds.width(), |
63 search_box_view_bounds.bottom() - bounds.y()); | 64 search_box_view_bounds.bottom() - bounds.y()); |
64 | 65 |
65 paint.setColor(kSearchBoxBackground); | 66 paint.setColor(kSearchBoxBackground); |
66 canvas->DrawRect(search_box_rect, paint); | 67 canvas->DrawRect(search_box_rect, paint); |
67 | 68 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 bounds.bottom() - contents_switcher_top); | 100 bounds.bottom() - contents_switcher_top); |
100 paint.setColor(kContentsSwitcherBackgroundColor); | 101 paint.setColor(kContentsSwitcherBackgroundColor); |
101 canvas->DrawRect(contents_switcher_rect, paint); | 102 canvas->DrawRect(contents_switcher_rect, paint); |
102 } | 103 } |
103 } | 104 } |
104 | 105 |
105 canvas->Restore(); | 106 canvas->Restore(); |
106 } | 107 } |
107 | 108 |
108 } // namespace app_list | 109 } // namespace app_list |
OLD | NEW |