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

Side by Side Diff: ui/keyboard/keyboard_controller.cc

Issue 574033003: Remove keyboard usability mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile error and unneccessary headers Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/keyboard/keyboard_controller.h" 5 #include "ui/keyboard/keyboard_controller.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "content/public/browser/render_widget_host.h" 11 #include "content/public/browser/render_widget_host.h"
12 #include "content/public/browser/render_widget_host_iterator.h" 12 #include "content/public/browser/render_widget_host_iterator.h"
13 #include "content/public/browser/render_widget_host_view.h" 13 #include "content/public/browser/render_widget_host_view.h"
14 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
15 #include "ui/aura/window_delegate.h" 15 #include "ui/aura/window_delegate.h"
16 #include "ui/aura/window_observer.h" 16 #include "ui/aura/window_observer.h"
17 #include "ui/base/cursor/cursor.h" 17 #include "ui/base/cursor/cursor.h"
18 #include "ui/base/hit_test.h" 18 #include "ui/base/hit_test.h"
19 #include "ui/base/ime/input_method.h" 19 #include "ui/base/ime/input_method.h"
20 #include "ui/base/ime/text_input_client.h" 20 #include "ui/base/ime/text_input_client.h"
21 #include "ui/compositor/layer_animation_observer.h" 21 #include "ui/compositor/layer_animation_observer.h"
22 #include "ui/compositor/scoped_layer_animation_settings.h" 22 #include "ui/compositor/scoped_layer_animation_settings.h"
23 #include "ui/gfx/path.h" 23 #include "ui/gfx/path.h"
24 #include "ui/gfx/rect.h" 24 #include "ui/gfx/rect.h"
25 #include "ui/gfx/skia_util.h" 25 #include "ui/gfx/skia_util.h"
26 #include "ui/keyboard/keyboard_controller_observer.h" 26 #include "ui/keyboard/keyboard_controller_observer.h"
27 #include "ui/keyboard/keyboard_controller_proxy.h" 27 #include "ui/keyboard/keyboard_controller_proxy.h"
28 #include "ui/keyboard/keyboard_layout_manager.h" 28 #include "ui/keyboard/keyboard_layout_manager.h"
29 #include "ui/keyboard/keyboard_switches.h"
30 #include "ui/keyboard/keyboard_util.h" 29 #include "ui/keyboard/keyboard_util.h"
31 #include "ui/wm/core/masked_window_targeter.h" 30 #include "ui/wm/core/masked_window_targeter.h"
32 31
33 #if defined(OS_CHROMEOS) 32 #if defined(OS_CHROMEOS)
34 #include "base/process/launch.h" 33 #include "base/process/launch.h"
35 #include "base/sys_info.h" 34 #include "base/sys_info.h"
36 #endif 35 #endif
37 36
38 namespace { 37 namespace {
39 38
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 show_on_resize_ = false; 400 show_on_resize_ = false;
402 proxy_->ReloadKeyboardIfNeeded(); 401 proxy_->ReloadKeyboardIfNeeded();
403 } 402 }
404 } 403 }
405 404
406 void KeyboardController::OnTextInputStateChanged( 405 void KeyboardController::OnTextInputStateChanged(
407 const ui::TextInputClient* client) { 406 const ui::TextInputClient* client) {
408 if (!container_.get()) 407 if (!container_.get())
409 return; 408 return;
410 409
411 if (IsKeyboardUsabilityExperimentEnabled()) {
412 ShowKeyboardInternal();
413 return;
414 }
415
416 type_ = client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE; 410 type_ = client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE;
417 411
418 if (type_ == ui::TEXT_INPUT_TYPE_NONE && !lock_keyboard_) { 412 if (type_ == ui::TEXT_INPUT_TYPE_NONE && !lock_keyboard_) {
419 if (keyboard_visible_) { 413 if (keyboard_visible_) {
420 // Set the visibility state here so that any queries for visibility 414 // Set the visibility state here so that any queries for visibility
421 // before the timer fires returns the correct future value. 415 // before the timer fires returns the correct future value.
422 keyboard_visible_ = false; 416 keyboard_visible_ = false;
423 base::MessageLoop::current()->PostDelayedTask( 417 base::MessageLoop::current()->PostDelayedTask(
424 FROM_HERE, 418 FROM_HERE,
425 base::Bind(&KeyboardController::HideKeyboard, 419 base::Bind(&KeyboardController::HideKeyboard,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 proxy_->HideKeyboardContainer(container_.get()); 573 proxy_->HideKeyboardContainer(container_.get());
580 } 574 }
581 575
582 void KeyboardController::AddBoundsChangedObserver(aura::Window* window) { 576 void KeyboardController::AddBoundsChangedObserver(aura::Window* window) {
583 aura::Window* target_window = GetFrameWindow(window); 577 aura::Window* target_window = GetFrameWindow(window);
584 if (target_window) 578 if (target_window)
585 window_bounds_observer_->AddObservedWindow(target_window); 579 window_bounds_observer_->AddObservedWindow(target_window);
586 } 580 }
587 581
588 } // namespace keyboard 582 } // namespace keyboard
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc ('k') | ui/keyboard/keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698