diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-26 00:54:19 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-26 00:54:19 +0000 |
commit | 4b8003cd9f0cdc48c681a5c69c51610771d25f32 (patch) | |
tree | 1322bf592dcf003d7c918401b6a0637fc75c4c19 /ui/aura/desktop | |
parent | 9746f9132e55a91d2ec3d866711277b874574743 (diff) | |
download | chromium_src-4b8003cd9f0cdc48c681a5c69c51610771d25f32.zip chromium_src-4b8003cd9f0cdc48c681a5c69c51610771d25f32.tar.gz chromium_src-4b8003cd9f0cdc48c681a5c69c51610771d25f32.tar.bz2 |
Aura desktop: Show resize cursors again.
This moves CursorManager into ash/wm/ and makes it an implementation of a new
CursorClient interface. It's really an implementation detail of ash. Then
create a desktop version of this interface.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10692170
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/desktop')
-rw-r--r-- | ui/aura/desktop/desktop_cursor_client.cc | 30 | ||||
-rw-r--r-- | ui/aura/desktop/desktop_cursor_client.h | 36 |
2 files changed, 66 insertions, 0 deletions
diff --git a/ui/aura/desktop/desktop_cursor_client.cc b/ui/aura/desktop/desktop_cursor_client.cc new file mode 100644 index 0000000..d44cb32 --- /dev/null +++ b/ui/aura/desktop/desktop_cursor_client.cc @@ -0,0 +1,30 @@ +// 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/aura/desktop/desktop_cursor_client.h" + +#include "ui/aura/root_window.h" + +namespace aura { + +DesktopCursorClient::DesktopCursorClient(aura::RootWindow* window) + : root_window_(window) { +} + +DesktopCursorClient::~DesktopCursorClient() { +} + +void DesktopCursorClient::SetCursor(gfx::NativeCursor cursor) { + root_window_->SetCursor(cursor); +} + +void DesktopCursorClient::ShowCursor(bool show) { + root_window_->ShowCursor(show); +} + +bool DesktopCursorClient::IsCursorVisible() const { + return root_window_->cursor_shown(); +} + +} // namespace aura diff --git a/ui/aura/desktop/desktop_cursor_client.h b/ui/aura/desktop/desktop_cursor_client.h new file mode 100644 index 0000000..a4315ed --- /dev/null +++ b/ui/aura/desktop/desktop_cursor_client.h @@ -0,0 +1,36 @@ +// 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. + +#ifndef UI_AURA_DESKTOP_DESKTOP_CURSOR_CLIENT_H_ +#define UI_AURA_DESKTOP_DESKTOP_CURSOR_CLIENT_H_ + +#include "base/compiler_specific.h" +#include "ui/aura/aura_export.h" + +#include "ui/aura/client/cursor_client.h" + +namespace aura { +class RootWindow; + +// A CursorClient that interacts with only one RootWindow. (Unlike the one in +// ash, which interacts with all the RootWindows.) +class AURA_EXPORT DesktopCursorClient : public client::CursorClient { + public: + explicit DesktopCursorClient(aura::RootWindow* window); + virtual ~DesktopCursorClient(); + + // Overridden from client::CursorClient: + virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; + virtual void ShowCursor(bool show) OVERRIDE; + virtual bool IsCursorVisible() const OVERRIDE; + + private: + aura::RootWindow* root_window_; + + DISALLOW_COPY_AND_ASSIGN(DesktopCursorClient); +}; + +} // namespace aura + +#endif // UI_AURA_DESKTOP_DESKTOP_CURSOR_CLIENT_H_ |