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/views/apps_grid_view.h" | 5 #include "ui/app_list/views/apps_grid_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 bounds_animator_(this), | 333 bounds_animator_(this), |
334 is_root_level_(true), | 334 is_root_level_(true), |
335 activated_item_view_(NULL), | 335 activated_item_view_(NULL), |
336 dragging_for_reparent_item_(false) { | 336 dragging_for_reparent_item_(false) { |
337 SetPaintToLayer(true); | 337 SetPaintToLayer(true); |
338 SetFillsBoundsOpaquely(false); | 338 SetFillsBoundsOpaquely(false); |
339 | 339 |
340 pagination_model_->AddObserver(this); | 340 pagination_model_->AddObserver(this); |
341 AddChildView(page_switcher_view_); | 341 AddChildView(page_switcher_view_); |
342 | 342 |
343 if (start_page_contents) { | 343 if (start_page_contents && app_list::switches::IsStartPageWebUIEnabled()) { |
344 start_page_view_ = | 344 start_page_view_ = |
345 new views::WebView(start_page_contents->GetBrowserContext()); | 345 new views::WebView(start_page_contents->GetBrowserContext()); |
346 start_page_view_->SetWebContents(start_page_contents); | 346 start_page_view_->SetWebContents(start_page_contents); |
347 AddChildView(start_page_view_); | 347 AddChildView(start_page_view_); |
348 } | 348 } |
349 } | 349 } |
350 | 350 |
351 AppsGridView::~AppsGridView() { | 351 AppsGridView::~AppsGridView() { |
352 // Coming here |drag_view_| should already be canceled since otherwise the | 352 // Coming here |drag_view_| should already be canceled since otherwise the |
353 // drag would disappear after the app list got animated away and closed, | 353 // drag would disappear after the app list got animated away and closed, |
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2081 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, | 2081 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, |
2082 bool is_target_folder) { | 2082 bool is_target_folder) { |
2083 AppListItemView* target_view = | 2083 AppListItemView* target_view = |
2084 static_cast<AppListItemView*>( | 2084 static_cast<AppListItemView*>( |
2085 GetViewAtSlotOnCurrentPage(target_index.slot)); | 2085 GetViewAtSlotOnCurrentPage(target_index.slot)); |
2086 if (target_view) | 2086 if (target_view) |
2087 target_view->SetAsAttemptedFolderTarget(is_target_folder); | 2087 target_view->SetAsAttemptedFolderTarget(is_target_folder); |
2088 } | 2088 } |
2089 | 2089 |
2090 } // namespace app_list | 2090 } // namespace app_list |
OLD | NEW |