| 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/app_list_view.h" | 5 #include "ui/app_list/app_list_view.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "ui/app_list/app_list_bubble_border.h" | 8 #include "ui/app_list/app_list_bubble_border.h" |
| 9 #include "ui/app_list/app_list_item_view.h" | 9 #include "ui/app_list/app_list_item_view.h" |
| 10 #include "ui/app_list/app_list_model.h" | 10 #include "ui/app_list/app_list_model.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 views::BubbleDelegateView::CreateBubble(this); | 77 views::BubbleDelegateView::CreateBubble(this); |
| 78 | 78 |
| 79 // Overrides border with AppListBubbleBorder. | 79 // Overrides border with AppListBubbleBorder. |
| 80 bubble_border_ = new AppListBubbleBorder(this, search_box_view_); | 80 bubble_border_ = new AppListBubbleBorder(this, search_box_view_); |
| 81 GetBubbleFrameView()->SetBubbleBorder(bubble_border_); | 81 GetBubbleFrameView()->SetBubbleBorder(bubble_border_); |
| 82 SetBubbleArrowLocation(arrow_location); | 82 SetBubbleArrowLocation(arrow_location); |
| 83 | 83 |
| 84 // Resets default background since AppListBubbleBorder paints background. | 84 // Resets default background since AppListBubbleBorder paints background. |
| 85 GetBubbleFrameView()->set_background(NULL); | 85 GetBubbleFrameView()->set_background(NULL); |
| 86 | 86 |
| 87 contents_view_->SetPaintToLayer(true); |
| 88 contents_view_->SetFillsBoundsOpaquely(false); |
| 89 contents_view_->layer()->SetMasksToBounds(true); |
| 90 |
| 87 CreateModel(); | 91 CreateModel(); |
| 88 } | 92 } |
| 89 | 93 |
| 90 void AppListView::SetBubbleArrowLocation( | 94 void AppListView::SetBubbleArrowLocation( |
| 91 views::BubbleBorder::ArrowLocation arrow_location) { | 95 views::BubbleBorder::ArrowLocation arrow_location) { |
| 92 DCHECK(bubble_border_); | 96 DCHECK(bubble_border_); |
| 93 bubble_border_->set_arrow_location(arrow_location); | 97 bubble_border_->set_arrow_location(arrow_location); |
| 94 SizeToContents(); // Recalcuates with new border. | 98 SizeToContents(); // Recalcuates with new border. |
| 95 } | 99 } |
| 96 | 100 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 198 } |
| 195 | 199 |
| 196 void AppListView::InvokeResultAction(const SearchResult& result, | 200 void AppListView::InvokeResultAction(const SearchResult& result, |
| 197 int action_index, | 201 int action_index, |
| 198 int event_flags) { | 202 int event_flags) { |
| 199 if (delegate_.get()) | 203 if (delegate_.get()) |
| 200 delegate_->InvokeSearchResultAction(result, action_index, event_flags); | 204 delegate_->InvokeSearchResultAction(result, action_index, event_flags); |
| 201 } | 205 } |
| 202 | 206 |
| 203 } // namespace app_list | 207 } // namespace app_list |
| OLD | NEW |