| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/views/search_result_actions_view.h" | 5 #include "ui/app_list/views/search_result_actions_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "ui/app_list/views/search_result_actions_view_delegate.h" | 11 #include "ui/app_list/views/search_result_actions_view_delegate.h" |
| 12 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
| 13 #include "ui/gfx/canvas.h" | 13 #include "ui/gfx/canvas.h" |
| 14 #include "ui/views/border.h" | 14 #include "ui/views/border.h" |
| 15 #include "ui/views/controls/button/image_button.h" | |
| 16 #include "ui/views/controls/button/md_text_button.h" | 15 #include "ui/views/controls/button/md_text_button.h" |
| 17 #include "ui/views/layout/box_layout.h" | 16 #include "ui/views/layout/box_layout.h" |
| 18 | 17 |
| 19 namespace app_list { | 18 namespace app_list { |
| 20 | 19 |
| 21 SearchResultActionsView::SearchResultActionsView( | 20 SearchResultActionsView::SearchResultActionsView( |
| 22 SearchResultActionsViewDelegate* delegate) | 21 SearchResultActionsViewDelegate* delegate) |
| 23 : delegate_(delegate), | 22 : delegate_(delegate), |
| 24 selected_action_(-1) { | 23 selected_action_(-1) { |
| 25 SetLayoutManager( | 24 SetLayoutManager( |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 const ui::Event& event) { | 99 const ui::Event& event) { |
| 101 if (!delegate_) | 100 if (!delegate_) |
| 102 return; | 101 return; |
| 103 | 102 |
| 104 const int index = GetIndexOf(sender); | 103 const int index = GetIndexOf(sender); |
| 105 DCHECK_NE(-1, index); | 104 DCHECK_NE(-1, index); |
| 106 delegate_->OnSearchResultActionActivated(index, event.flags()); | 105 delegate_->OnSearchResultActionActivated(index, event.flags()); |
| 107 } | 106 } |
| 108 | 107 |
| 109 } // namespace app_list | 108 } // namespace app_list |
| OLD | NEW |