Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Unified Diff: ash/host/ash_remote_window_tree_host_win.cc

Issue 1602403002: Revert of Remove remote tree host and some related input and metro_driver code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-3
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/host/ash_remote_window_tree_host_win.h ('k') | ash/host/ash_window_tree_host_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/host/ash_remote_window_tree_host_win.cc
diff --git a/ash/host/ash_remote_window_tree_host_win.cc b/ash/host/ash_remote_window_tree_host_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f3191b5eda025a7b7d9fdeca211cd7d1b07224e6
--- /dev/null
+++ b/ash/host/ash_remote_window_tree_host_win.cc
@@ -0,0 +1,71 @@
+// Copyright 2014 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/host/ash_remote_window_tree_host_win.h"
+
+#include "ash/host/root_window_transformer.h"
+#include "ash/ime/input_method_event_handler.h"
+#include "ui/events/event_processor.h"
+#include "ui/gfx/geometry/insets.h"
+#include "ui/gfx/transform.h"
+
+namespace ash {
+
+AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin(HWND remote_hwnd)
+ : aura::RemoteWindowTreeHostWin(),
+ transformer_helper_(this) {
+ SetRemoteWindowHandle(remote_hwnd);
+ transformer_helper_.Init();
+}
+
+AshRemoteWindowTreeHostWin::~AshRemoteWindowTreeHostWin() {}
+
+void AshRemoteWindowTreeHostWin::ToggleFullScreen() {}
+
+bool AshRemoteWindowTreeHostWin::ConfineCursorToRootWindow() { return false; }
+
+void AshRemoteWindowTreeHostWin::UnConfineCursor() {}
+
+void AshRemoteWindowTreeHostWin::SetRootWindowTransformer(
+ scoped_ptr<RootWindowTransformer> transformer) {
+ transformer_helper_.SetRootWindowTransformer(transformer.Pass());
+}
+
+gfx::Insets AshRemoteWindowTreeHostWin::GetHostInsets() const {
+ return gfx::Insets();
+}
+
+aura::WindowTreeHost* AshRemoteWindowTreeHostWin::AsWindowTreeHost() {
+ return this;
+}
+
+gfx::Transform AshRemoteWindowTreeHostWin::GetRootTransform() const {
+ return transformer_helper_.GetTransform();
+}
+
+void AshRemoteWindowTreeHostWin::SetRootTransform(
+ const gfx::Transform& transform) {
+ transformer_helper_.SetTransform(transform);
+}
+
+gfx::Transform AshRemoteWindowTreeHostWin::GetInverseRootTransform() const {
+ return transformer_helper_.GetInverseTransform();
+}
+
+void AshRemoteWindowTreeHostWin::UpdateRootWindowSize(
+ const gfx::Size& host_size) {
+ transformer_helper_.UpdateWindowSize(host_size);
+}
+
+ui::EventDispatchDetails AshRemoteWindowTreeHostWin::DispatchKeyEventPostIME(
+ ui::KeyEvent* event) {
+ input_method_handler()->SetPostIME(true);
+ ui::EventDispatchDetails details =
+ event_processor()->OnEventFromSource(event);
+ if (!details.dispatcher_destroyed)
+ input_method_handler()->SetPostIME(false);
+ return details;
+}
+
+} // namespace ash
« no previous file with comments | « ash/host/ash_remote_window_tree_host_win.h ('k') | ash/host/ash_window_tree_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698