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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ui/app_list/app_list_bubble_border.h" | 9 #include "ui/app_list/app_list_bubble_border.h" |
10 #include "ui/app_list/app_list_item_view.h" | 10 #include "ui/app_list/app_list_item_view.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 AddChildView(search_results_view_); | 84 AddChildView(search_results_view_); |
85 | 85 |
86 page_switcher_view_ = new PageSwitcher(pagination_model_.get()); | 86 page_switcher_view_ = new PageSwitcher(pagination_model_.get()); |
87 AddChildView(page_switcher_view_); | 87 AddChildView(page_switcher_view_); |
88 | 88 |
89 search_box_view_->set_grid_view(apps_grid_view_); | 89 search_box_view_->set_grid_view(apps_grid_view_); |
90 search_box_view_->set_results_view(search_results_view_); | 90 search_box_view_->set_results_view(search_results_view_); |
91 | 91 |
92 set_anchor_view(anchor); | 92 set_anchor_view(anchor); |
93 set_margin(0); | 93 set_margin(0); |
| 94 set_move_with_anchor(true); |
94 set_parent_window(parent); | 95 set_parent_window(parent); |
95 set_close_on_deactivate(false); | 96 set_close_on_deactivate(false); |
96 views::BubbleDelegateView::CreateBubble(this); | 97 views::BubbleDelegateView::CreateBubble(this); |
97 | 98 |
98 // Resets default background since AppListBubbleBorder paints background. | 99 // Resets default background since AppListBubbleBorder paints background. |
99 GetBubbleFrameView()->set_background(NULL); | 100 GetBubbleFrameView()->set_background(NULL); |
100 | 101 |
101 // Overrides border with AppListBubbleBorder. | 102 // Overrides border with AppListBubbleBorder. |
102 bubble_border_ = new AppListBubbleBorder(this, | 103 bubble_border_ = new AppListBubbleBorder(this, |
103 search_box_view_, | 104 search_box_view_, |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 } | 292 } |
292 } | 293 } |
293 | 294 |
294 void AppListView::OpenResult(const SearchResult& result, int event_flags) { | 295 void AppListView::OpenResult(const SearchResult& result, int event_flags) { |
295 if (delegate_.get()) | 296 if (delegate_.get()) |
296 delegate_->OpenSearchResult(result, event_flags); | 297 delegate_->OpenSearchResult(result, event_flags); |
297 Close(); | 298 Close(); |
298 } | 299 } |
299 | 300 |
300 } // namespace app_list | 301 } // namespace app_list |
OLD | NEW |