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

Side by Side Diff: ash/common/shelf/shelf_layout_manager.cc

Issue 2445293002: Make the virtual keyboard show up on the display with input focus. (Closed)
Patch Set: fix one more compilation error on Windows Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/shelf/shelf_layout_manager.h" 5 #include "ash/common/shelf/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 382
383 void ShelfLayoutManager::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) { 383 void ShelfLayoutManager::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {
384 bool keyboard_is_about_to_hide = false; 384 bool keyboard_is_about_to_hide = false;
385 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty()) 385 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty())
386 keyboard_is_about_to_hide = true; 386 keyboard_is_about_to_hide = true;
387 // If new window behavior flag enabled and in non-sticky mode, do not change 387 // If new window behavior flag enabled and in non-sticky mode, do not change
388 // the work area. 388 // the work area.
389 bool change_work_area = 389 bool change_work_area =
390 (!base::CommandLine::ForCurrentProcess()->HasSwitch( 390 (!base::CommandLine::ForCurrentProcess()->HasSwitch(
391 ::switches::kUseNewVirtualKeyboardBehavior) || 391 ::switches::kUseNewVirtualKeyboardBehavior) ||
392 keyboard::KeyboardController::GetInstance()->get_lock_keyboard()); 392 keyboard::KeyboardController::GetInstance()->keyboard_locked());
393 393
394 keyboard_bounds_ = new_bounds; 394 keyboard_bounds_ = new_bounds;
395 LayoutShelfAndUpdateBounds(change_work_area); 395 LayoutShelfAndUpdateBounds(change_work_area);
396 396
397 // On login screen if keyboard has been just hidden, update bounds just once 397 // On login screen if keyboard has been just hidden, update bounds just once
398 // but ignore target_bounds.work_area_insets since shelf overlaps with login 398 // but ignore target_bounds.work_area_insets since shelf overlaps with login
399 // window. 399 // window.
400 if (WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked() && 400 if (WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked() &&
401 keyboard_is_about_to_hide) { 401 keyboard_is_about_to_hide) {
402 WmWindow* window = WmLookup::Get()->GetWindowForWidget(shelf_widget_); 402 WmWindow* window = WmLookup::Get()->GetWindowForWidget(shelf_widget_);
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 gesture_drag_status_ = GESTURE_DRAG_NONE; 1102 gesture_drag_status_ = GESTURE_DRAG_NONE;
1103 } 1103 }
1104 1104
1105 void ShelfLayoutManager::CancelGestureDrag() { 1105 void ShelfLayoutManager::CancelGestureDrag() {
1106 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS; 1106 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS;
1107 UpdateVisibilityState(); 1107 UpdateVisibilityState();
1108 gesture_drag_status_ = GESTURE_DRAG_NONE; 1108 gesture_drag_status_ = GESTURE_DRAG_NONE;
1109 } 1109 }
1110 1110
1111 } // namespace ash 1111 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/keyboard/keyboard_ui.cc ('k') | ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698