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

Unified Diff: ash/accelerators/accelerator_controller_delegate_aura.cc

Issue 2751693003: chromeos: Migrate window rotation accelerator to common (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | ash/common/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_delegate_aura.cc
diff --git a/ash/accelerators/accelerator_controller_delegate_aura.cc b/ash/accelerators/accelerator_controller_delegate_aura.cc
index 0b41cc824fdfdc6d779cd74d26c622369452a812..ed149017bf116c9db8f517524cc04627cfb38091 100644
--- a/ash/accelerators/accelerator_controller_delegate_aura.cc
+++ b/ash/accelerators/accelerator_controller_delegate_aura.cc
@@ -25,23 +25,18 @@
#include "ash/magnifier/magnification_controller.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
-#include "ash/rotator/window_rotation.h"
#include "ash/screenshot_delegate.h"
#include "ash/shell.h"
#include "ash/touch/touch_hud_debug.h"
#include "ash/utility/screenshot_controller.h"
#include "ash/wm/power_button_controller.h"
#include "ash/wm/window_state_aura.h"
-#include "ash/wm/window_util.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics.h"
#include "base/sys_info.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/accelerators/accelerator.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/layer_animator.h"
#include "ui/display/manager/display_manager.h"
#include "ui/display/screen.h"
#include "ui/events/event.h"
@@ -103,23 +98,6 @@ void HandleRotateScreen() {
display::Display::ROTATION_SOURCE_USER);
}
-// Rotate the active window.
-void HandleRotateActiveWindow() {
- base::RecordAction(UserMetricsAction("Accel_Rotate_Active_Window"));
- aura::Window* active_window = wm::GetActiveWindow();
- if (active_window) {
- // The rotation animation bases its target transform on the current
- // rotation and position. Since there could be an animation in progress
- // right now, queue this animation so when it starts it picks up a neutral
- // rotation and position. Use replace so we only enqueue one at a time.
- active_window->layer()->GetAnimator()->set_preemption_strategy(
- ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
- active_window->layer()->GetAnimator()->StartAnimation(
- new ui::LayerAnimationSequence(
- base::MakeUnique<WindowRotation>(360, active_window->layer())));
- }
-}
-
void HandleTakeWindowScreenshot(ScreenshotDelegate* screenshot_delegate) {
base::RecordAction(UserMetricsAction("Accel_Take_Window_Screenshot"));
DCHECK(screenshot_delegate);
@@ -211,7 +189,6 @@ bool AcceleratorControllerDelegateAura::HandlesAction(
case POWER_PRESSED:
case POWER_RELEASED:
case ROTATE_SCREEN:
- case ROTATE_WINDOW:
case SCALE_UI_DOWN:
case SCALE_UI_RESET:
case SCALE_UI_UP:
@@ -263,7 +240,6 @@ bool AcceleratorControllerDelegateAura::CanPerformAction(
case POWER_PRESSED:
case POWER_RELEASED:
case ROTATE_SCREEN:
- case ROTATE_WINDOW:
case TAKE_PARTIAL_SCREENSHOT:
case TAKE_SCREENSHOT:
case TAKE_WINDOW_SCREENSHOT:
@@ -337,9 +313,6 @@ void AcceleratorControllerDelegateAura::PerformAction(
case ROTATE_SCREEN:
HandleRotateScreen();
break;
- case ROTATE_WINDOW:
- HandleRotateActiveWindow();
- break;
case SCALE_UI_DOWN:
accelerators::ZoomInternalDisplay(false /* down */);
break;
« no previous file with comments | « no previous file | ash/common/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698