| 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 "ui/app_list/app_list_bubble_border.h" | 7 #include "ui/app_list/app_list_bubble_border.h" |
| 8 #include "ui/app_list/app_list_item_view.h" | 8 #include "ui/app_list/app_list_item_view.h" |
| 9 #include "ui/app_list/app_list_model.h" | 9 #include "ui/app_list/app_list_model.h" |
| 10 #include "ui/app_list/app_list_view_delegate.h" | 10 #include "ui/app_list/app_list_view_delegate.h" |
| 11 #include "ui/app_list/contents_view.h" | 11 #include "ui/app_list/contents_view.h" |
| 12 #include "ui/app_list/pagination_model.h" | 12 #include "ui/app_list/pagination_model.h" |
| 13 #include "ui/app_list/search_box_model.h" | 13 #include "ui/app_list/search_box_model.h" |
| 14 #include "ui/app_list/search_box_view.h" | 14 #include "ui/app_list/search_box_view.h" |
| 15 #include "ui/base/event.h" |
| 15 #include "ui/gfx/insets.h" | 16 #include "ui/gfx/insets.h" |
| 16 #include "ui/views/bubble/bubble_frame_view.h" | 17 #include "ui/views/bubble/bubble_frame_view.h" |
| 17 #include "ui/views/controls/textfield/textfield.h" | 18 #include "ui/views/controls/textfield/textfield.h" |
| 18 #include "ui/views/layout/box_layout.h" | 19 #include "ui/views/layout/box_layout.h" |
| 19 #include "ui/views/widget/widget.h" | 20 #include "ui/views/widget/widget.h" |
| 20 | 21 |
| 21 namespace app_list { | 22 namespace app_list { |
| 22 | 23 |
| 23 namespace { | 24 namespace { |
| 24 | 25 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 123 |
| 123 bool AppListView::HasHitTestMask() const { | 124 bool AppListView::HasHitTestMask() const { |
| 124 return true; | 125 return true; |
| 125 } | 126 } |
| 126 | 127 |
| 127 void AppListView::GetHitTestMask(gfx::Path* mask) const { | 128 void AppListView::GetHitTestMask(gfx::Path* mask) const { |
| 128 DCHECK(mask); | 129 DCHECK(mask); |
| 129 bubble_border_->GetMask(GetBubbleFrameView()->bounds(), mask); | 130 bubble_border_->GetMask(GetBubbleFrameView()->bounds(), mask); |
| 130 } | 131 } |
| 131 | 132 |
| 132 bool AppListView::OnKeyPressed(const views::KeyEvent& event) { | 133 bool AppListView::OnKeyPressed(const ui::KeyEvent& event) { |
| 133 if (event.key_code() == ui::VKEY_ESCAPE) { | 134 if (event.key_code() == ui::VKEY_ESCAPE) { |
| 134 Close(); | 135 Close(); |
| 135 return true; | 136 return true; |
| 136 } | 137 } |
| 137 | 138 |
| 138 return false; | 139 return false; |
| 139 } | 140 } |
| 140 | 141 |
| 141 void AppListView::ButtonPressed(views::Button* sender, | 142 void AppListView::ButtonPressed(views::Button* sender, |
| 142 const views::Event& event) { | 143 const views::Event& event) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 } | 186 } |
| 186 } | 187 } |
| 187 | 188 |
| 188 void AppListView::OpenResult(const SearchResult& result, int event_flags) { | 189 void AppListView::OpenResult(const SearchResult& result, int event_flags) { |
| 189 if (delegate_.get()) | 190 if (delegate_.get()) |
| 190 delegate_->OpenSearchResult(result, event_flags); | 191 delegate_->OpenSearchResult(result, event_flags); |
| 191 Close(); | 192 Close(); |
| 192 } | 193 } |
| 193 | 194 |
| 194 } // namespace app_list | 195 } // namespace app_list |
| OLD | NEW |