diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 19:58:40 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 19:58:40 +0000 |
commit | 607419ad5ffcb6cda8434af8aa74c8ce8e0a5f4c (patch) | |
tree | 401b3658590771fb48ad3014e4919717b6e14d13 /ash/test | |
parent | 14493f632abdc0fbd9b1d647df4d4ba2efe1c32c (diff) | |
download | chromium_src-607419ad5ffcb6cda8434af8aa74c8ce8e0a5f4c.zip chromium_src-607419ad5ffcb6cda8434af8aa74c8ce8e0a5f4c.tar.gz chromium_src-607419ad5ffcb6cda8434af8aa74c8ce8e0a5f4c.tar.bz2 |
This CL create just a window which will be used to show
the mirrored content of the source window. See the next steps
for
misc:
* added debug+desktop only shortcut
* rotating square display now update the root window.
Next steps:
* Mirror cursor
* Modify OutputConfigurator to fallback to software mirror mode.
* Scale the root window size for mirror window so that
it has the same size as the source root window.
* Copy texture from soruce window to dest window.
* Handle device scale factor/cursor scaling.
BUG=239776
TEST=covered by test
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201618
Review URL: https://chromiumcodereview.appspot.com/15367003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r-- | ash/test/mirror_window_test_api.cc | 31 | ||||
-rw-r--r-- | ash/test/mirror_window_test_api.h | 40 |
2 files changed, 71 insertions, 0 deletions
diff --git a/ash/test/mirror_window_test_api.cc b/ash/test/mirror_window_test_api.cc new file mode 100644 index 0000000..9d331c0 --- /dev/null +++ b/ash/test/mirror_window_test_api.cc @@ -0,0 +1,31 @@ +// Copyright (c) 2013 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 "ash/test/mirror_window_test_api.h" + +#include "ash/display/mirror_window_controller.h" +#include "ash/shell.h" +#include "ui/gfx/point.h" + +namespace ash { +namespace test { + +const aura::RootWindow* MirrorWindowTestApi::GetRootWindow() const { + return Shell::GetInstance()->mirror_window_controller()->root_window_.get(); +} + +int MirrorWindowTestApi::GetCurrentCursorType() const { + return Shell::GetInstance()->mirror_window_controller()->current_cursor_type_; +} + +const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const { + return Shell::GetInstance()->mirror_window_controller()->hot_point_; +} + +const aura::Window* MirrorWindowTestApi::GetCursorWindow() const { + return Shell::GetInstance()->mirror_window_controller()->cursor_window_; +} + +} // namespace test +} // namespace ash diff --git a/ash/test/mirror_window_test_api.h b/ash/test/mirror_window_test_api.h new file mode 100644 index 0000000..c2028be --- /dev/null +++ b/ash/test/mirror_window_test_api.h @@ -0,0 +1,40 @@ +// Copyright (c) 2013 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 ASH_TEST_MIRROR_WINDOW_TEST_API_H_ +#define ASH_TEST_MIRROR_WINDOW_TEST_API_H_ + +#include "base/basictypes.h" + +namespace aura { +class RootWindow; +class Window; +} + +namespace gfx { +class Point; +} + +namespace ash { +namespace test { + +class MirrorWindowTestApi { + public: + MirrorWindowTestApi() {} + ~MirrorWindowTestApi() {} + + const aura::RootWindow* GetRootWindow() const; + + int GetCurrentCursorType() const; + const gfx::Point& GetCursorHotPoint() const; + const aura::Window* GetCursorWindow() const; + + private: + DISALLOW_COPY_AND_ASSIGN(MirrorWindowTestApi); +}; + +} // namespace test +} // namespace ash + +#endif // ASH_TEST_MIRROR_WINDOW_TEST_API_H_ |