Don't preload rarely seen large images
[chromium-blink-merge.git] / ash / host / ash_remote_window_tree_host_win.cc
blob7ce8718646c1da5d228394436221ee80c2a60e1c
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 "ash/ime/input_method_event_handler.h"
9 #include "ui/gfx/geometry/insets.h"
10 #include "ui/gfx/transform.h"
12 namespace ash {
14 AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin(HWND remote_hwnd)
15 : aura::RemoteWindowTreeHostWin(),
16 transformer_helper_(this) {
17 SetRemoteWindowHandle(remote_hwnd);
18 transformer_helper_.Init();
21 AshRemoteWindowTreeHostWin::~AshRemoteWindowTreeHostWin() {}
23 void AshRemoteWindowTreeHostWin::ToggleFullScreen() {}
25 bool AshRemoteWindowTreeHostWin::ConfineCursorToRootWindow() { return false; }
27 void AshRemoteWindowTreeHostWin::UnConfineCursor() {}
29 void AshRemoteWindowTreeHostWin::SetRootWindowTransformer(
30 scoped_ptr<RootWindowTransformer> transformer) {
31 transformer_helper_.SetRootWindowTransformer(transformer.Pass());
34 gfx::Insets AshRemoteWindowTreeHostWin::GetHostInsets() const {
35 return gfx::Insets();
38 aura::WindowTreeHost* AshRemoteWindowTreeHostWin::AsWindowTreeHost() {
39 return this;
42 gfx::Transform AshRemoteWindowTreeHostWin::GetRootTransform() const {
43 return transformer_helper_.GetTransform();
46 void AshRemoteWindowTreeHostWin::SetRootTransform(
47 const gfx::Transform& transform) {
48 transformer_helper_.SetTransform(transform);
51 gfx::Transform AshRemoteWindowTreeHostWin::GetInverseRootTransform() const {
52 return transformer_helper_.GetInverseTransform();
55 void AshRemoteWindowTreeHostWin::UpdateRootWindowSize(
56 const gfx::Size& host_size) {
57 transformer_helper_.UpdateWindowSize(host_size);
60 bool AshRemoteWindowTreeHostWin::DispatchKeyEventPostIME(
61 const ui::KeyEvent& event) {
62 ui::KeyEvent event_copy(event);
63 input_method_handler()->SetPostIME(true);
64 ui::EventSource::DeliverEventToProcessor(&event_copy);
65 input_method_handler()->SetPostIME(false);
66 return event_copy.handled();
69 ui::EventDispatchDetails AshRemoteWindowTreeHostWin::DeliverEventToProcessor(
70 ui::Event* event) {
71 return ui::EventSource::DeliverEventToProcessor(event);
74 } // namespace ash