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

Unified Diff: ui/aura/client/virtual_keyboard_client.cc

Issue 195793004: Implement overscroll support for the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright notice. Created 6 years, 9 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
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

Powered by Google App Engine
This is Rietveld 408576698