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" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 contents_view_->SetModel(new_model.get()); | 108 contents_view_->SetModel(new_model.get()); |
109 | 109 |
110 model_.reset(new_model.release()); | 110 model_.reset(new_model.release()); |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 views::View* AppListView::GetInitiallyFocusedView() { | 114 views::View* AppListView::GetInitiallyFocusedView() { |
115 return search_box_view_->search_box(); | 115 return search_box_view_->search_box(); |
116 } | 116 } |
117 | 117 |
| 118 bool AppListView::HasHitTestMask() const { |
| 119 return true; |
| 120 } |
| 121 |
| 122 void AppListView::GetHitTestMask(gfx::Path* mask) const { |
| 123 DCHECK(mask); |
| 124 bubble_border_->GetMask(GetBubbleFrameView()->bounds(), mask); |
| 125 } |
| 126 |
118 bool AppListView::OnKeyPressed(const views::KeyEvent& event) { | 127 bool AppListView::OnKeyPressed(const views::KeyEvent& event) { |
119 if (event.key_code() == ui::VKEY_ESCAPE) { | 128 if (event.key_code() == ui::VKEY_ESCAPE) { |
120 Close(); | 129 Close(); |
121 return true; | 130 return true; |
122 } | 131 } |
123 | 132 |
124 return false; | 133 return false; |
125 } | 134 } |
126 | 135 |
127 void AppListView::ButtonPressed(views::Button* sender, | 136 void AppListView::ButtonPressed(views::Button* sender, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 } | 201 } |
193 } | 202 } |
194 | 203 |
195 void AppListView::OpenResult(const SearchResult& result, int event_flags) { | 204 void AppListView::OpenResult(const SearchResult& result, int event_flags) { |
196 if (delegate_.get()) | 205 if (delegate_.get()) |
197 delegate_->OpenSearchResult(result, event_flags); | 206 delegate_->OpenSearchResult(result, event_flags); |
198 Close(); | 207 Close(); |
199 } | 208 } |
200 | 209 |
201 } // namespace app_list | 210 } // namespace app_list |
OLD | NEW |