Index: ui/app_list/views/apps_grid_view.cc |
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc |
index 470632df054073e925dd4786d958cb2e5b054838..57ec933df39c0ad847ad61c33c7e9cc5688a863a 100644 |
--- a/ui/app_list/views/apps_grid_view.cc |
+++ b/ui/app_list/views/apps_grid_view.cc |
@@ -22,6 +22,8 @@ |
#include "ui/app_list/views/page_switcher.h" |
#include "ui/app_list/views/pulsing_block_view.h" |
#include "ui/app_list/views/top_icon_animation_view.h" |
+#include "ui/aura/window.h" |
+#include "ui/aura/window_event_dispatcher.h" |
#include "ui/compositor/scoped_layer_animation_settings.h" |
#include "ui/events/event.h" |
#include "ui/gfx/animation/animation.h" |
@@ -30,14 +32,6 @@ |
#include "ui/views/view_model_utils.h" |
#include "ui/views/widget/widget.h" |
-#if defined(USE_AURA) |
-#include "ui/aura/window.h" |
-#include "ui/aura/window_event_dispatcher.h" |
-#if defined(OS_WIN) |
-#include "ui/views/win/hwnd_util.h" |
-#endif // defined(OS_WIN) |
-#endif // defined(USE_AURA) |
- |
#if defined(OS_WIN) |
#include "base/command_line.h" |
#include "base/files/file_path.h" |
@@ -46,6 +40,7 @@ |
#include "ui/base/dragdrop/drop_target_win.h" |
#include "ui/base/dragdrop/os_exchange_data.h" |
#include "ui/base/dragdrop/os_exchange_data_provider_win.h" |
+#include "ui/views/win/hwnd_util.h" |
#endif |
namespace app_list { |
@@ -930,10 +925,8 @@ views::View* AppsGridView::CreateViewForItemAtIndex(size_t index) { |
AppListItemView* view = new AppListItemView(this, |
item_list_->item_at(index)); |
view->SetIconSize(icon_size_); |
-#if defined(USE_AURA) |
view->SetPaintToLayer(true); |
view->SetFillsBoundsOpaquely(false); |
-#endif |
return view; |
} |
@@ -1155,7 +1148,6 @@ void AppsGridView::AnimationBetweenRows(views::View* view, |
const int dir = current_page < target_page || |
(current_page == target_page && current.y() < target.y()) ? 1 : -1; |
-#if defined(USE_AURA) |
scoped_ptr<ui::Layer> layer; |
if (animate_current) { |
layer = view->RecreateLayer(); |
@@ -1167,7 +1159,6 @@ void AppsGridView::AnimationBetweenRows(views::View* view, |
gfx::Rect current_out(current); |
current_out.Offset(dir * kPreferredTileWidth, 0); |
-#endif |
gfx::Rect target_in(target); |
if (animate_target) |
@@ -1175,17 +1166,15 @@ void AppsGridView::AnimationBetweenRows(views::View* view, |
view->SetBoundsRect(target_in); |
bounds_animator_.AnimateViewTo(view, target); |
-#if defined(USE_AURA) |
bounds_animator_.SetAnimationDelegate( |
view, |
new RowMoveAnimationDelegate(view, layer.release(), current_out), |
true); |
-#endif |
} |
void AppsGridView::ExtractDragLocation(const ui::LocatedEvent& event, |
gfx::Point* drag_point) { |
-#if defined(USE_AURA) && !defined(OS_WIN) |
tapted
2014/04/23 23:38:09
This one.. I'll actually need to refactor drag and
|
+#if !defined(OS_WIN) |
// Use root location of |event| instead of location in |drag_view_|'s |
// coordinates because |drag_view_| has a scale transform and location |
// could have integer round error and causes jitter. |
@@ -1885,13 +1874,11 @@ void AppsGridView::OnAppListModelStatusChanged() { |
} |
void AppsGridView::SetViewHidden(views::View* view, bool hide, bool immediate) { |
-#if defined(USE_AURA) |
ui::ScopedLayerAnimationSettings animator(view->layer()->GetAnimator()); |
animator.SetPreemptionStrategy( |
immediate ? ui::LayerAnimator::IMMEDIATELY_SET_NEW_TARGET : |
ui::LayerAnimator::BLEND_WITH_CURRENT_ANIMATION); |
view->layer()->SetOpacity(hide ? 0 : 1); |
-#endif |
} |
void AppsGridView::OnImplicitAnimationsCompleted() { |