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

Unified Diff: chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc

Issue 292233002: Disable VK overscroll for login/out-of-box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, keyboard override value: convert to bool Created 6 years, 7 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/webui/chromeos/login/core_oobe_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
index 6e5f600a1776d090c24dcc34e5a1b4ee1ed7b9f8..602ffe72a7e85d25cb8ee2ddca7811df422a7147 100644
--- a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
@@ -5,11 +5,13 @@
#include "chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h"
#include "ash/magnifier/magnifier_constants.h"
+#include "ash/shell.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
+#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
@@ -23,6 +25,10 @@
#include "chromeos/chromeos_constants.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "ui/gfx/display.h"
+#include "ui/gfx/screen.h"
+#include "ui/gfx/size.h"
+#include "ui/keyboard/keyboard_controller.h"
namespace {
@@ -103,6 +109,8 @@ void CoreOobeHandler::Initialize() {
version_info_updater_.StartUpdate(false);
#endif
UpdateDeviceRequisition();
+ UpdateKeyboardState();
+ UpdateClientAreaSize();
}
void CoreOobeHandler::RegisterMessages() {
@@ -214,6 +222,14 @@ void CoreOobeHandler::ShowControlBar(bool show) {
CallJS("showControlBar", show);
}
+void CoreOobeHandler::SetKeyboardState(bool shown) {
+ CallJS("setKeyboardState", shown);
+}
+
+void CoreOobeHandler::SetClientAreaSize(int width, int height) {
+ CallJS("setClientAreaSize", width, height);
+}
+
void CoreOobeHandler::HandleInitialized() {
oobe_ui_->InitializeHandlers();
}
@@ -345,6 +361,22 @@ void CoreOobeHandler::UpdateDeviceRequisition() {
connector->GetDeviceCloudPolicyManager()->GetDeviceRequisition());
}
+void CoreOobeHandler::UpdateKeyboardState() {
+ if (login::LoginScrollIntoViewEnabled()) {
+ keyboard::KeyboardController* keyboard_controller =
+ keyboard::KeyboardController::GetInstance();
+ if (keyboard_controller) {
+ gfx::Rect bounds = keyboard_controller->current_keyboard_bounds();
+ SetKeyboardState(!bounds.IsEmpty());
+ }
+ }
+}
+
+void CoreOobeHandler::UpdateClientAreaSize() {
+ const gfx::Size& size = ash::Shell::GetScreen()->GetPrimaryDisplay().size();
+ SetClientAreaSize(size.width(), size.height());
+}
+
void CoreOobeHandler::OnAccessibilityStatusChanged(
const AccessibilityStatusEventDetails& details) {
if (details.notification_type == ACCESSIBILITY_MANAGER_SHUTDOWN)

Powered by Google App Engine
This is Rietveld 408576698