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 "ash/accelerators/accelerator_commands_aura.h" | 5 #include "ash/accelerators/accelerator_commands_aura.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/wm/screen_pinning_controller.h" | 8 #include "ash/wm/screen_pinning_controller.h" |
9 #include "ash/wm/window_state.h" | 9 #include "ash/wm/window_state.h" |
10 #include "ash/wm_window.h" | |
11 #include "base/metrics/user_metrics.h" | 10 #include "base/metrics/user_metrics.h" |
12 #include "ui/display/manager/display_manager.h" | 11 #include "ui/display/manager/display_manager.h" |
13 #include "ui/display/manager/managed_display_info.h" | 12 #include "ui/display/manager/managed_display_info.h" |
14 | 13 |
15 namespace ash { | 14 namespace ash { |
16 namespace accelerators { | 15 namespace accelerators { |
17 | 16 |
18 void ToggleTouchHudProjection() { | 17 void ToggleTouchHudProjection() { |
19 base::RecordAction(base::UserMetricsAction("Accel_Touch_Hud_Clear")); | 18 base::RecordAction(base::UserMetricsAction("Accel_Touch_Hud_Clear")); |
20 bool enabled = Shell::Get()->is_touch_hud_projection_enabled(); | 19 bool enabled = Shell::Get()->is_touch_hud_projection_enabled(); |
(...skipping 16 matching lines...) Expand all Loading... |
37 return display_manager->ZoomInternalDisplay(up); | 36 return display_manager->ZoomInternalDisplay(up); |
38 } | 37 } |
39 | 38 |
40 void ResetInternalDisplayZoom() { | 39 void ResetInternalDisplayZoom() { |
41 base::RecordAction(base::UserMetricsAction("Accel_Scale_Ui_Reset")); | 40 base::RecordAction(base::UserMetricsAction("Accel_Scale_Ui_Reset")); |
42 display::DisplayManager* display_manager = Shell::Get()->display_manager(); | 41 display::DisplayManager* display_manager = Shell::Get()->display_manager(); |
43 display_manager->ResetInternalDisplayZoom(); | 42 display_manager->ResetInternalDisplayZoom(); |
44 } | 43 } |
45 | 44 |
46 void Unpin() { | 45 void Unpin() { |
47 WmWindow* pinned_window = | 46 aura::Window* pinned_window = |
48 Shell::Get()->screen_pinning_controller()->pinned_window(); | 47 Shell::Get()->screen_pinning_controller()->pinned_window(); |
49 if (pinned_window) | 48 if (pinned_window) |
50 pinned_window->GetWindowState()->Restore(); | 49 wm::GetWindowState(pinned_window)->Restore(); |
51 } | 50 } |
52 | 51 |
53 } // namespace accelerators | 52 } // namespace accelerators |
54 } // namespace ash | 53 } // namespace ash |
OLD | NEW |