OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ash/app_list/app_list_view.h" | 5 #include "ash/app_list/app_list_view.h" |
6 | 6 |
7 #include "ash/app_list/app_list_groups_view.h" | 7 #include "ash/app_list/app_list_groups_view.h" |
8 #include "ash/app_list/app_list_item_view.h" | 8 #include "ash/app_list/app_list_item_view.h" |
9 #include "ash/app_list/app_list_model.h" | 9 #include "ash/app_list/app_list_model.h" |
10 #include "ash/app_list/app_list_view_delegate.h" | 10 #include "ash/app_list/app_list_view_delegate.h" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ui/views/layout/fill_layout.h" | 12 #include "ui/views/layout/fill_layout.h" |
13 #include "ui/views/widget/widget.h" | 13 #include "ui/views/widget/widget.h" |
14 | 14 |
15 namespace aura_shell { | 15 namespace ash { |
16 | 16 |
17 AppListView::AppListView( | 17 AppListView::AppListView( |
18 AppListModel* model, | 18 AppListModel* model, |
19 AppListViewDelegate* delegate, | 19 AppListViewDelegate* delegate, |
20 const gfx::Rect& bounds, | 20 const gfx::Rect& bounds, |
21 const aura_shell::ShellDelegate::SetWidgetCallback& callback) | 21 const ash::ShellDelegate::SetWidgetCallback& callback) |
22 : model_(model), | 22 : model_(model), |
23 delegate_(delegate) { | 23 delegate_(delegate) { |
24 Init(bounds, callback); | 24 Init(bounds, callback); |
25 } | 25 } |
26 | 26 |
27 AppListView::~AppListView() { | 27 AppListView::~AppListView() { |
28 } | 28 } |
29 | 29 |
30 void AppListView::Close() { | 30 void AppListView::Close() { |
31 if (GetWidget()->IsVisible()) | 31 if (GetWidget()->IsVisible()) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 return true; | 70 return true; |
71 } | 71 } |
72 | 72 |
73 void AppListView::AppListItemActivated(AppListItemView* sender, | 73 void AppListView::AppListItemActivated(AppListItemView* sender, |
74 int event_flags) { | 74 int event_flags) { |
75 if (delegate_.get()) | 75 if (delegate_.get()) |
76 delegate_->OnAppListItemActivated(sender->model(), event_flags); | 76 delegate_->OnAppListItemActivated(sender->model(), event_flags); |
77 Close(); | 77 Close(); |
78 } | 78 } |
79 | 79 |
80 } // namespace aura_shell | 80 } // namespace ash |
OLD | NEW |