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

Unified Diff: ui/views/widget/desktop_aura/desktop_cursor_client.cc

Issue 12263050: Rework ash::CursorManager into a corewm object, to share code with desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_cursor_client.cc
diff --git a/ui/views/widget/desktop_aura/desktop_cursor_client.cc b/ui/views/widget/desktop_aura/desktop_cursor_client.cc
deleted file mode 100644
index b027e74b62ce17aed6933f22d7ca759ea56ba179..0000000000000000000000000000000000000000
--- a/ui/views/widget/desktop_aura/desktop_cursor_client.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/views/widget/desktop_aura/desktop_cursor_client.h"
-
-#include "ui/aura/root_window.h"
-#include "ui/base/cursor/cursor_loader.h"
-
-namespace views {
-
-DesktopCursorClient::DesktopCursorClient(aura::RootWindow* window)
- : root_window_(window),
- cursor_loader_(ui::CursorLoader::Create()),
- current_cursor_(ui::kCursorNone),
- cursor_visible_(true) {
-}
-
-DesktopCursorClient::~DesktopCursorClient() {
-}
-
-void DesktopCursorClient::SetCursor(gfx::NativeCursor cursor) {
- current_cursor_ = cursor;
- cursor_loader_->SetPlatformCursor(&current_cursor_);
- if (cursor_visible_)
- root_window_->SetCursor(current_cursor_);
-}
-
-void DesktopCursorClient::ShowCursor() {
- SetCursorVisibility(true);
-}
-
-void DesktopCursorClient::HideCursor() {
- SetCursorVisibility(false);
-}
-
-bool DesktopCursorClient::IsCursorVisible() const {
- return cursor_visible_;
-}
-
-void DesktopCursorClient::EnableMouseEvents() {
- // TODO(mazda): Implement this.
- NOTIMPLEMENTED();
-}
-
-void DesktopCursorClient::DisableMouseEvents() {
- // TODO(mazda): Implement this.
- NOTIMPLEMENTED();
-}
-
-bool DesktopCursorClient::IsMouseEventsEnabled() const {
- // TODO(mazda): Implement this.
- NOTIMPLEMENTED();
- return true;
-}
-
-void DesktopCursorClient::SetDeviceScaleFactor(float device_scale_factor) {
- cursor_loader_->UnloadAll();
- cursor_loader_->set_device_scale_factor(device_scale_factor);
-}
-
-void DesktopCursorClient::LockCursor() {
- // TODO(mazda): Implement this.
- NOTIMPLEMENTED();
-}
-
-void DesktopCursorClient::UnlockCursor() {
- // TODO(mazda): Implement this.
- NOTIMPLEMENTED();
-}
-
-void DesktopCursorClient::SetCursorVisibility(bool visible) {
- if (cursor_visible_ == visible)
- return;
- cursor_visible_ = visible;
- root_window_->SetCursor(current_cursor_);
- root_window_->OnCursorVisibilityChanged(visible);
-}
-
-} // namespace views
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_cursor_client.h ('k') | ui/views/widget/desktop_aura/desktop_native_cursor_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698