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

Unified Diff: chrome/browser/ui/ash/chrome_keyboard_ui.cc

Issue 1323053005: Fix cropped floating gesture candidate window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 5 years, 2 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: chrome/browser/ui/ash/chrome_keyboard_ui.cc
diff --git a/chrome/browser/ui/ash/chrome_keyboard_ui.cc b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
index 24f0fe358907589a48559aa82f0de32cdb4c057f..7af78fdc99f9f387e22e38e7d8155e5c0c98fbb0 100644
--- a/chrome/browser/ui/ash/chrome_keyboard_ui.cc
+++ b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
@@ -4,7 +4,9 @@
#include "chrome/browser/ui/ash/chrome_keyboard_ui.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"
@@ -176,6 +178,24 @@ void ChromeKeyboardUI::ShowKeyboardContainer(aura::Window* container) {
KeyboardUIContent::ShowKeyboardContainer(container);
}
+bool ChromeKeyboardUI::ShouldWindowOverscroll(aura::Window* window) const {
+ aura::Window* root_window = window->GetRootWindow();
+ if (!root_window)
+ return true;
+
+ if (root_window != GetKeyboardRootWindow())
+ return false;
+
+ ash::RootWindowController* root_window_controller =
+ ash::GetRootWindowController(root_window);
+ // 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 ChromeKeyboardUI::SetUpdateInputType(ui::TextInputType type) {
// TODO(bshe): Need to check the affected window's profile once multi-profile
// is supported.
« no previous file with comments | « chrome/browser/ui/ash/chrome_keyboard_ui.h ('k') | chrome/browser/ui/ash/keyboard_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698