Chromium Code Reviews| Index: ui/app_list/app_list_view.cc |
| diff --git a/ui/app_list/app_list_view.cc b/ui/app_list/app_list_view.cc |
| index d1c0b43f19dd974317d69977e5079aeddbb85b3d..cb89855318a24d328bd43ff136944c6fe537b2bf 100644 |
| --- a/ui/app_list/app_list_view.cc |
| +++ b/ui/app_list/app_list_view.cc |
| @@ -51,8 +51,16 @@ void AppListView::InitAsBubble( |
| gfx::NativeView parent, |
| PaginationModel* pagination_model, |
| views::View* anchor, |
| + const gfx::Point& anchor_point, |
| views::BubbleBorder::ArrowLocation arrow_location) { |
| +// TODO(benwells): Make the background painting consistent across ports. |
| +// This will require not doing it in the bubble border but in the view. |
|
xiyuan
2012/08/29 17:39:15
The reason to do it in bubble border is that it kn
benwells
2012/08/30 06:51:30
OK, for now I've removed this TODO and added one i
|
| +#if defined(OS_WIN) |
| + set_background(views::Background::CreateSolidBackground( |
| + AppListBubbleBorder::ContentsBackgroundColor())); |
| +#else |
| set_background(NULL); |
| +#endif |
| SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, |
| kInnerPadding, |
| @@ -68,6 +76,7 @@ void AppListView::InitAsBubble( |
| search_box_view_->set_contents_view(contents_view_); |
| set_anchor_view(anchor); |
| + set_anchor_point(anchor_point); |
|
xiyuan
2012/08/29 17:39:15
on Windows, think you also need set_color(AppListB
benwells
2012/08/30 06:51:30
Maybe I'm missing some subtle detail but it looks
xiyuan
2012/08/30 16:50:51
We still need set_background call above because Bu
|
| set_margins(gfx::Insets()); |
| set_move_with_anchor(true); |
| set_parent_window(parent); |
| @@ -81,8 +90,10 @@ void AppListView::InitAsBubble( |
| GetBubbleFrameView()->SetBubbleBorder(bubble_border_); |
| SetBubbleArrowLocation(arrow_location); |
| +#if !defined(OS_WIN) |
| // Resets default background since AppListBubbleBorder paints background. |
| GetBubbleFrameView()->set_background(NULL); |
| +#endif |
| CreateModel(); |
| } |
| @@ -131,6 +142,13 @@ void AppListView::GetHitTestMask(gfx::Path* mask) const { |
| bubble_border_->GetMask(GetBubbleFrameView()->bounds(), mask); |
| } |
| +gfx::ImageSkia AppListView::GetWindowAppIcon() { |
| + if (delegate_.get()) |
| + return delegate_->GetWindowAppIcon(); |
| + |
| + return gfx::ImageSkia(); |
| +} |
| + |
| bool AppListView::OnKeyPressed(const ui::KeyEvent& event) { |
| if (event.key_code() == ui::VKEY_ESCAPE) { |
| Close(); |