OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "ash/host/ash_remote_window_tree_host_win.h" |
| 6 |
| 7 #include "ash/host/root_window_transformer.h" |
| 8 #include "ash/ime/input_method_event_handler.h" |
| 9 #include "ui/events/event_processor.h" |
| 10 #include "ui/gfx/geometry/insets.h" |
| 11 #include "ui/gfx/transform.h" |
| 12 |
| 13 namespace ash { |
| 14 |
| 15 AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin(HWND remote_hwnd) |
| 16 : aura::RemoteWindowTreeHostWin(), |
| 17 transformer_helper_(this) { |
| 18 SetRemoteWindowHandle(remote_hwnd); |
| 19 transformer_helper_.Init(); |
| 20 } |
| 21 |
| 22 AshRemoteWindowTreeHostWin::~AshRemoteWindowTreeHostWin() {} |
| 23 |
| 24 void AshRemoteWindowTreeHostWin::ToggleFullScreen() {} |
| 25 |
| 26 bool AshRemoteWindowTreeHostWin::ConfineCursorToRootWindow() { return false; } |
| 27 |
| 28 void AshRemoteWindowTreeHostWin::UnConfineCursor() {} |
| 29 |
| 30 void AshRemoteWindowTreeHostWin::SetRootWindowTransformer( |
| 31 scoped_ptr<RootWindowTransformer> transformer) { |
| 32 transformer_helper_.SetRootWindowTransformer(transformer.Pass()); |
| 33 } |
| 34 |
| 35 gfx::Insets AshRemoteWindowTreeHostWin::GetHostInsets() const { |
| 36 return gfx::Insets(); |
| 37 } |
| 38 |
| 39 aura::WindowTreeHost* AshRemoteWindowTreeHostWin::AsWindowTreeHost() { |
| 40 return this; |
| 41 } |
| 42 |
| 43 gfx::Transform AshRemoteWindowTreeHostWin::GetRootTransform() const { |
| 44 return transformer_helper_.GetTransform(); |
| 45 } |
| 46 |
| 47 void AshRemoteWindowTreeHostWin::SetRootTransform( |
| 48 const gfx::Transform& transform) { |
| 49 transformer_helper_.SetTransform(transform); |
| 50 } |
| 51 |
| 52 gfx::Transform AshRemoteWindowTreeHostWin::GetInverseRootTransform() const { |
| 53 return transformer_helper_.GetInverseTransform(); |
| 54 } |
| 55 |
| 56 void AshRemoteWindowTreeHostWin::UpdateRootWindowSize( |
| 57 const gfx::Size& host_size) { |
| 58 transformer_helper_.UpdateWindowSize(host_size); |
| 59 } |
| 60 |
| 61 ui::EventDispatchDetails AshRemoteWindowTreeHostWin::DispatchKeyEventPostIME( |
| 62 ui::KeyEvent* event) { |
| 63 input_method_handler()->SetPostIME(true); |
| 64 ui::EventDispatchDetails details = |
| 65 event_processor()->OnEventFromSource(event); |
| 66 if (!details.dispatcher_destroyed) |
| 67 input_method_handler()->SetPostIME(false); |
| 68 return details; |
| 69 } |
| 70 |
| 71 } // namespace ash |
OLD | NEW |