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

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: add tests 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 | ash/shell.cc » ('j') | no next file with comments »
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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 // Adjust the scale to just |kMinMagnifiedScale| if scale is bigger than 358 // Adjust the scale to just |kMinMagnifiedScale| if scale is bigger than
359 // |kMinMagnifiedScaleThreshold|; 359 // |kMinMagnifiedScaleThreshold|;
360 if (*scale > kMaxMagnifiedScaleThreshold) 360 if (*scale > kMaxMagnifiedScaleThreshold)
361 *scale = kMaxMagnifiedScale; 361 *scale = kMaxMagnifiedScale;
362 362
363 DCHECK(kNonMagnifiedScale <= *scale && *scale <= kMaxMagnifiedScale); 363 DCHECK(kNonMagnifiedScale <= *scale && *scale <= kMaxMagnifiedScale);
364 } 364 }
365 365
366 void MagnificationControllerImpl::OnImplicitAnimationsCompleted() { 366 void MagnificationControllerImpl::OnImplicitAnimationsCompleted() {
367 if (!is_on_zooming_)
368 return;
367 aura::client::CursorClient* cursor_client = 369 aura::client::CursorClient* cursor_client =
368 aura::client::GetCursorClient(root_window_); 370 aura::client::GetCursorClient(root_window_);
369 if (cursor_client) 371 if (cursor_client)
370 cursor_client->ShowCursor(true); 372 cursor_client->ShowCursor(true);
371 is_on_zooming_ = false; 373 is_on_zooming_ = false;
372 } 374 }
373 375
374 void MagnificationControllerImpl::SwitchTargetRootWindow( 376 void MagnificationControllerImpl::SwitchTargetRootWindow(
375 aura::RootWindow* new_root_window) { 377 aura::RootWindow* new_root_window) {
376 if (new_root_window == root_window_) 378 if (new_root_window == root_window_)
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 506
505 //////////////////////////////////////////////////////////////////////////////// 507 ////////////////////////////////////////////////////////////////////////////////
506 // MagnificationController: 508 // MagnificationController:
507 509
508 // static 510 // static
509 MagnificationController* MagnificationController::CreateInstance() { 511 MagnificationController* MagnificationController::CreateInstance() {
510 return new MagnificationControllerImpl(); 512 return new MagnificationControllerImpl();
511 } 513 }
512 514
513 } // namespace ash 515 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698