Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3037)

Unified Diff: ash/wm/overview/scoped_transform_overview_window.cc

Issue 2901903003: [ash] Cleanup of ScopedOverviewAnimationSettings (Closed)
Patch Set: [ash] Cleanup of ScopedOverviewAnimationSettings (nuked factory) Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/overview/scoped_overview_animation_settings_factory_aura.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/scoped_transform_overview_window.cc
diff --git a/ash/wm/overview/scoped_transform_overview_window.cc b/ash/wm/overview/scoped_transform_overview_window.cc
index 003134a6ae51d5e7149501134be9e764b368fcaa..b76d4d07f9823f9cecaff6974a5e064c9d564c17 100644
--- a/ash/wm/overview/scoped_transform_overview_window.cc
+++ b/ash/wm/overview/scoped_transform_overview_window.cc
@@ -9,7 +9,6 @@
#include "ash/root_window_controller.h"
#include "ash/wm/overview/scoped_overview_animation_settings.h"
-#include "ash/wm/overview/scoped_overview_animation_settings_factory.h"
#include "ash/wm/overview/window_selector_item.h"
#include "ash/wm/window_mirror_view.h"
#include "ash/wm/window_state.h"
@@ -45,13 +44,6 @@ aura::Window* GetTransientRoot(aura::Window* window) {
return window;
}
-std::unique_ptr<ScopedOverviewAnimationSettings>
-CreateScopedOverviewAnimationSettings(OverviewAnimationType animation_type,
- aura::Window* window) {
- return ScopedOverviewAnimationSettingsFactory::Get()
- ->CreateOverviewAnimationSettings(animation_type, window);
-}
-
// An iterator class that traverses an aura::Window and all of its transient
// descendants.
class TransientDescendantIterator {
@@ -197,10 +189,9 @@ void ScopedTransformOverviewWindow::RestoreWindow() {
BeginScopedAnimation(OverviewAnimationType::OVERVIEW_ANIMATION_RESTORE_WINDOW,
&animation_settings_list);
SetTransform(window()->GetRootWindow(), original_transform_);
- std::unique_ptr<ScopedOverviewAnimationSettings> animation_settings =
- CreateScopedOverviewAnimationSettings(
- OverviewAnimationType::OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS,
- window_);
+ ScopedOverviewAnimationSettings animation_settings(
+ OverviewAnimationType::OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS,
+ window_);
wm::GetWindowState(window_)->set_ignored_by_shelf(ignored_by_shelf_);
SetOpacity(original_opacity_);
}
@@ -210,7 +201,8 @@ void ScopedTransformOverviewWindow::BeginScopedAnimation(
ScopedAnimationSettings* animation_settings) {
for (auto* window : GetTransientTreeIterator(GetOverviewWindow())) {
animation_settings->push_back(
- CreateScopedOverviewAnimationSettings(animation_type, window));
+ base::MakeUnique<ScopedOverviewAnimationSettings>(animation_type,
+ window));
}
}
« no previous file with comments | « ash/wm/overview/scoped_overview_animation_settings_factory_aura.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698