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

Unified Diff: ash/common/wm/workspace/workspace_layout_manager.cc

Issue 2180603002: Virtual keyboard - do not change work area of screen if in non-sticky mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: ash/common/wm/workspace/workspace_layout_manager.cc
diff --git a/ash/common/wm/workspace/workspace_layout_manager.cc b/ash/common/wm/workspace/workspace_layout_manager.cc
index 78de58d1124feea1bf024025791bbc070994b6db..7eebcdb6f14d30447170a4693e70a6dc29437a71 100644
--- a/ash/common/wm/workspace/workspace_layout_manager.cc
+++ b/ash/common/wm/workspace/workspace_layout_manager.cc
@@ -5,7 +5,7 @@
#include "ash/common/wm/workspace/workspace_layout_manager.h"
#include <algorithm>
oshima 2016/07/22 23:45:01 new line between c++ include and chrome includes.
hariank 2016/07/27 20:38:38 Done.
-
+#include "ash/common/ash_switches.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/wm/always_on_top_controller.h"
#include "ash/common/wm/fullscreen_window_finder.h"
@@ -19,7 +19,9 @@
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/common/wm_window_property.h"
+#include "base/command_line.h"
#include "ui/compositor/layer.h"
+#include "ui/keyboard/keyboard_controller.h"
#include "ui/keyboard/keyboard_controller_observer.h"
namespace ash {
@@ -142,7 +144,14 @@ void WorkspaceLayoutManager::OnKeyboardBoundsChanging(
if (window_state->ignore_keyboard_bounds_change())
return;
- if (!new_bounds.IsEmpty()) {
+ // If new window behavior flag enabled and in non-sticky mode, do not change
+ // the work area.
+ bool change_work_area =
+ (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshUseNewVKWindowBehavior) ||
+ keyboard::KeyboardController::GetInstance()->get_lock_keyboard());
oshima 2016/07/22 23:45:01 if think this method will be gone with new mode, (
hariank 2016/07/27 20:38:39 Done.
+
+ if (!new_bounds.IsEmpty() && change_work_area) {
// Store existing bounds to be restored before resizing for keyboard if it
// is not already stored.
if (!window_state->HasRestoreBounds())

Powered by Google App Engine
This is Rietveld 408576698