Index: chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc |
diff --git a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc |
index af8563cdaae745a392b1e425d9ccc4025b08c594..11d39dd220e98e10f8014121d7ea329e7b1acd5a 100644 |
--- a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc |
+++ b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc |
@@ -4,7 +4,9 @@ |
#include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h" |
+#include "ash/root_window_controller.h" |
#include "ash/shell.h" |
+#include "ash/shell_window_ids.h" |
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
#include "chrome/browser/media/media_capture_devices_dispatcher.h" |
#include "content/public/browser/host_zoom_map.h" |
@@ -181,6 +183,21 @@ void AshKeyboardControllerProxy::ShowKeyboardContainer( |
KeyboardControllerProxy::ShowKeyboardContainer(container); |
} |
+bool AshKeyboardControllerProxy::ShouldWindowOverscroll( |
+ aura::Window* window) const { |
+ ash::RootWindowController* root_window_controller = |
+ ash::GetRootWindowController(window->GetRootWindow()); |
+ if (!root_window_controller) |
oshima
2015/09/23 19:57:27
can this happen? If not, please use DCHECK instead
bshe
2015/09/24 11:56:15
I think so. One window (I am not sure which) doesn
oshima
2015/09/24 17:28:07
can you check the root window instead then?
bshe
2015/09/28 14:42:40
Done.
|
+ return true; |
+ |
+ // Shell ime window container contains virtual keyboard windows and IME |
+ // windows(IME windows are created by chrome.app.window.create api). They |
+ // should never be overscrolled. |
+ return !root_window_controller |
+ ->GetContainer(ash::kShellWindowId_ImeWindowParentContainer) |
+ ->Contains(window); |
+} |
+ |
void AshKeyboardControllerProxy::SetUpdateInputType(ui::TextInputType type) { |
// TODO(bshe): Need to check the affected window's profile once multi-profile |
// is supported. |