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

Side by Side Diff: ui/aura/root_window.cc

Issue 10399118: 2x Cursor support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remoev extra space Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
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 "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 draw_on_compositing_end_ = false; 578 draw_on_compositing_end_ = false;
579 579
580 // Call ScheduleDraw() instead of Draw() in order to allow other 580 // Call ScheduleDraw() instead of Draw() in order to allow other
581 // ui::CompositorObservers to be notified before starting another 581 // ui::CompositorObservers to be notified before starting another
582 // draw cycle. 582 // draw cycle.
583 ScheduleDraw(); 583 ScheduleDraw();
584 } 584 }
585 } 585 }
586 586
587 //////////////////////////////////////////////////////////////////////////////// 587 ////////////////////////////////////////////////////////////////////////////////
588 // RootWindow, ui::LayerDelegate implementation:
589 void RootWindow::OnDeviceScaleFactorChanged(
590 float device_scale_factor) {
591 if (cursor_shown_)
592 ShowCursor(false);
593 host_->OnDeviceScaleFactorChanged(device_scale_factor);
594 Window::OnDeviceScaleFactorChanged(device_scale_factor);
595 if (cursor_shown_)
596 ShowCursor(true);
597 }
598
599 ////////////////////////////////////////////////////////////////////////////////
588 // RootWindow, private: 600 // RootWindow, private:
589 601
590 void RootWindow::HandleMouseCaptureChanged(Window* old_capture_window) { 602 void RootWindow::HandleMouseCaptureChanged(Window* old_capture_window) {
591 if (capture_window_) 603 if (capture_window_)
592 host_->SetCapture(); 604 host_->SetCapture();
593 else 605 else
594 host_->ReleaseCapture(); 606 host_->ReleaseCapture();
595 607
596 if (old_capture_window && old_capture_window->delegate()) { 608 if (old_capture_window && old_capture_window->delegate()) {
597 // Send a capture changed event with bogus location data. 609 // Send a capture changed event with bogus location data.
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 void RootWindow::UnlockCompositor() { 1036 void RootWindow::UnlockCompositor() {
1025 DCHECK(compositor_lock_); 1037 DCHECK(compositor_lock_);
1026 compositor_lock_ = NULL; 1038 compositor_lock_ = NULL;
1027 if (draw_on_compositor_unlock_) { 1039 if (draw_on_compositor_unlock_) {
1028 draw_on_compositor_unlock_ = false; 1040 draw_on_compositor_unlock_ = false;
1029 ScheduleDraw(); 1041 ScheduleDraw();
1030 } 1042 }
1031 } 1043 }
1032 1044
1033 } // namespace aura 1045 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698