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 "grit/ui_resources.h" | |
9 #include "third_party/skia/include/core/SkPaint.h" | 8 #include "third_party/skia/include/core/SkPaint.h" |
10 #include "third_party/skia/include/core/SkPath.h" | 9 #include "third_party/skia/include/core/SkPath.h" |
11 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
12 #include "ui/app_list/app_list_switches.h" | 11 #include "ui/app_list/app_list_switches.h" |
13 #include "ui/app_list/views/app_list_main_view.h" | 12 #include "ui/app_list/views/app_list_main_view.h" |
14 #include "ui/app_list/views/contents_view.h" | 13 #include "ui/app_list/views/contents_view.h" |
15 #include "ui/app_list/views/search_box_view.h" | 14 #include "ui/app_list/views/search_box_view.h" |
16 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
17 #include "ui/gfx/canvas.h" | 16 #include "ui/gfx/canvas.h" |
18 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 separator_rect.set_height(kBottomSeparatorSize); | 94 separator_rect.set_height(kBottomSeparatorSize); |
96 canvas->FillRect(separator_rect, kBottomSeparatorColor); | 95 canvas->FillRect(separator_rect, kBottomSeparatorColor); |
97 int contents_switcher_top = separator_rect.bottom(); | 96 int contents_switcher_top = separator_rect.bottom(); |
98 gfx::Rect contents_switcher_rect(bounds.x(), | 97 gfx::Rect contents_switcher_rect(bounds.x(), |
99 contents_switcher_top, | 98 contents_switcher_top, |
100 bounds.width(), | 99 bounds.width(), |
101 bounds.bottom() - contents_switcher_top); | 100 bounds.bottom() - contents_switcher_top); |
102 paint.setColor(kContentsSwitcherBackgroundColor); | 101 paint.setColor(kContentsSwitcherBackgroundColor); |
103 canvas->DrawRect(contents_switcher_rect, paint); | 102 canvas->DrawRect(contents_switcher_rect, paint); |
104 } | 103 } |
105 | |
106 // Draw a banner in the corner of the app list if it is the experimental app | |
107 // list. | |
108 const gfx::ImageSkia& experimental_icon = | |
109 *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | |
110 IDR_APP_LIST_EXPERIMENTAL_ICON); | |
111 canvas->DrawImageInt(experimental_icon, | |
112 contents_rect.right() - experimental_icon.width(), | |
113 contents_rect.bottom() - experimental_icon.height()); | |
114 } | 104 } |
115 | 105 |
116 canvas->Restore(); | 106 canvas->Restore(); |
117 } | 107 } |
118 | 108 |
119 } // namespace app_list | 109 } // namespace app_list |
OLD | NEW |