Index: ui/aura/client/virtual_keyboard_client.cc |
diff --git a/ui/aura/client/virtual_keyboard_client.cc b/ui/aura/client/virtual_keyboard_client.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8ff453f33d775fbf9a41bbd224381ae0ba794472 |
--- /dev/null |
+++ b/ui/aura/client/virtual_keyboard_client.cc |
@@ -0,0 +1,33 @@ |
+// 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 "ui/aura/client/virtual_keyboard_client.h" |
+ |
+#include "ui/aura/window_event_dispatcher.h" |
+#include "ui/aura/window_property.h" |
+ |
+DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(AURA_EXPORT, aura::Window*) |
+DECLARE_WINDOW_PROPERTY_TYPE(aura::client::VirtualKeyboardClient*) |
+ |
+namespace aura { |
+namespace client { |
+ |
+DEFINE_WINDOW_PROPERTY_KEY(VirtualKeyboardClient*, |
+ kRootWindowVirtualKeyboardClientKey, |
+ NULL); |
+ |
+void SetVirtualKeyboardClient(Window* root_window, |
+ VirtualKeyboardClient* client) { |
+ DCHECK_EQ(root_window->GetRootWindow(), root_window); |
+ root_window->SetProperty(kRootWindowVirtualKeyboardClientKey, client); |
+} |
+ |
+VirtualKeyboardClient* GetVirtualKeyboardClient(const Window* window) { |
+ const Window* root_window = window->GetRootWindow(); |
+ return root_window ? |
+ root_window->GetProperty(kRootWindowVirtualKeyboardClientKey) : NULL; |
+} |
+ |
+} // namespace client |
+} // namespace aura |