| 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/app_list_main_view.h" | 5 #include "ui/app_list/views/app_list_main_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 search_box_view_(NULL), | 81 search_box_view_(NULL), |
| 82 contents_view_(NULL) { | 82 contents_view_(NULL) { |
| 83 // Starts icon loading early. | 83 // Starts icon loading early. |
| 84 PreloadIcons(pagination_model, anchor); | 84 PreloadIcons(pagination_model, anchor); |
| 85 | 85 |
| 86 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, | 86 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, |
| 87 kInnerPadding, | 87 kInnerPadding, |
| 88 kInnerPadding, | 88 kInnerPadding, |
| 89 kInnerPadding)); | 89 kInnerPadding)); |
| 90 | 90 |
| 91 search_box_view_ = new SearchBoxView(this); | 91 search_box_view_ = new SearchBoxView(this, delegate); |
| 92 AddChildView(search_box_view_); | 92 AddChildView(search_box_view_); |
| 93 | 93 |
| 94 contents_view_ = new ContentsView(this, pagination_model); | 94 contents_view_ = new ContentsView(this, pagination_model); |
| 95 AddChildView(contents_view_); | 95 AddChildView(contents_view_); |
| 96 | 96 |
| 97 search_box_view_->set_contents_view(contents_view_); | 97 search_box_view_->set_contents_view(contents_view_); |
| 98 | 98 |
| 99 #if defined(USE_AURA) | 99 #if defined(USE_AURA) |
| 100 contents_view_->SetPaintToLayer(true); | 100 contents_view_->SetPaintToLayer(true); |
| 101 contents_view_->SetFillsBoundsOpaquely(false); | 101 contents_view_->SetFillsBoundsOpaquely(false); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } | 199 } |
| 200 | 200 |
| 201 void AppListMainView::InvokeResultAction(const SearchResult& result, | 201 void AppListMainView::InvokeResultAction(const SearchResult& result, |
| 202 int action_index, | 202 int action_index, |
| 203 int event_flags) { | 203 int event_flags) { |
| 204 if (delegate_) | 204 if (delegate_) |
| 205 delegate_->InvokeSearchResultAction(result, action_index, event_flags); | 205 delegate_->InvokeSearchResultAction(result, action_index, event_flags); |
| 206 } | 206 } |
| 207 | 207 |
| 208 } // namespace app_list | 208 } // namespace app_list |
| OLD | NEW |