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

Side by Side Diff: ash/magnifier/magnification_controller.cc

Issue 11364003: Fix the issue of cursor being shown at startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/ash/ash_init.cc » ('j') | chrome/browser/ui/ash/ash_init.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/ash_init.cc » ('j') | chrome/browser/ui/ash/ash_init.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698