1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ash/host/ash_remote_window_tree_host_win.h"
7 #include "ash/host/root_window_transformer.h"
8 #include "ui/gfx/geometry/insets.h"
9 #include "ui/gfx/transform.h"
13 AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin(HWND remote_hwnd
)
14 : aura::RemoteWindowTreeHostWin(),
15 transformer_helper_(this) {
16 SetRemoteWindowHandle(remote_hwnd
);
17 transformer_helper_
.Init();
20 AshRemoteWindowTreeHostWin::~AshRemoteWindowTreeHostWin() {}
22 void AshRemoteWindowTreeHostWin::ToggleFullScreen() {}
24 bool AshRemoteWindowTreeHostWin::ConfineCursorToRootWindow() { return false; }
26 void AshRemoteWindowTreeHostWin::UnConfineCursor() {}
28 void AshRemoteWindowTreeHostWin::SetRootWindowTransformer(
29 scoped_ptr
<RootWindowTransformer
> transformer
) {
30 transformer_helper_
.SetRootWindowTransformer(transformer
.Pass());
33 gfx::Insets
AshRemoteWindowTreeHostWin::GetHostInsets() const {
37 aura::WindowTreeHost
* AshRemoteWindowTreeHostWin::AsWindowTreeHost() {
41 gfx::Transform
AshRemoteWindowTreeHostWin::GetRootTransform() const {
42 return transformer_helper_
.GetTransform();
45 void AshRemoteWindowTreeHostWin::SetRootTransform(
46 const gfx::Transform
& transform
) {
47 transformer_helper_
.SetTransform(transform
);
50 gfx::Transform
AshRemoteWindowTreeHostWin::GetInverseRootTransform() const {
51 return transformer_helper_
.GetInverseTransform();
54 void AshRemoteWindowTreeHostWin::UpdateRootWindowSize(
55 const gfx::Size
& host_size
) {
56 transformer_helper_
.UpdateWindowSize(host_size
);