| 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 "ash/magnifier/magnification_controller.h" | 5 #include "ash/magnifier/magnification_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
| 9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
| 10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 363 |
| 364 // Adjust the scale to just |kMinMagnifiedScale| if scale is bigger than | 364 // Adjust the scale to just |kMinMagnifiedScale| if scale is bigger than |
| 365 // |kMinMagnifiedScaleThreshold|; | 365 // |kMinMagnifiedScaleThreshold|; |
| 366 if (*scale > kMaxMagnifiedScaleThreshold) | 366 if (*scale > kMaxMagnifiedScaleThreshold) |
| 367 *scale = kMaxMagnifiedScale; | 367 *scale = kMaxMagnifiedScale; |
| 368 | 368 |
| 369 DCHECK(kNonMagnifiedScale <= *scale && *scale <= kMaxMagnifiedScale); | 369 DCHECK(kNonMagnifiedScale <= *scale && *scale <= kMaxMagnifiedScale); |
| 370 } | 370 } |
| 371 | 371 |
| 372 void MagnificationControllerImpl::OnImplicitAnimationsCompleted() { | 372 void MagnificationControllerImpl::OnImplicitAnimationsCompleted() { |
| 373 if (!is_on_zooming_) |
| 374 return; |
| 373 aura::client::CursorClient* cursor_client = | 375 aura::client::CursorClient* cursor_client = |
| 374 aura::client::GetCursorClient(root_window_); | 376 aura::client::GetCursorClient(root_window_); |
| 375 if (cursor_client) | 377 if (cursor_client) |
| 376 cursor_client->ShowCursor(true); | 378 cursor_client->ShowCursor(true); |
| 377 is_on_zooming_ = false; | 379 is_on_zooming_ = false; |
| 378 } | 380 } |
| 379 | 381 |
| 380 void MagnificationControllerImpl::SwitchTargetRootWindow( | 382 void MagnificationControllerImpl::SwitchTargetRootWindow( |
| 381 aura::RootWindow* new_root_window) { | 383 aura::RootWindow* new_root_window) { |
| 382 if (new_root_window == root_window_) | 384 if (new_root_window == root_window_) |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 //////////////////////////////////////////////////////////////////////////////// | 501 //////////////////////////////////////////////////////////////////////////////// |
| 500 // MagnificationController: | 502 // MagnificationController: |
| 501 | 503 |
| 502 // static | 504 // static |
| 503 MagnificationController* MagnificationController::CreateInstance() { | 505 MagnificationController* MagnificationController::CreateInstance() { |
| 504 return new MagnificationControllerImpl(); | 506 return new MagnificationControllerImpl(); |
| 505 } | 507 } |
| 506 | 508 |
| 507 } // namespace internal | 509 } // namespace internal |
| 508 } // namespace ash | 510 } // namespace ash |
| OLD | NEW |