diff options
author | bshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-04 21:38:45 +0000 |
---|---|---|
committer | bshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-04 21:38:45 +0000 |
commit | b6ba05d90aaa93a4e707bdec67ba2c043a3a533f (patch) | |
tree | 94f5cecc6e48a262db4049514e610ab34a63538d /ash/shell.h | |
parent | 88645e15d7743209f5babd5574e4e30f31f277a4 (diff) | |
download | chromium_src-b6ba05d90aaa93a4e707bdec67ba2c043a3a533f.zip chromium_src-b6ba05d90aaa93a4e707bdec67ba2c043a3a533f.tar.gz chromium_src-b6ba05d90aaa93a4e707bdec67ba2c043a3a533f.tar.bz2 |
Only show virtual keyboard on primary root window
In order to display virtual keyboard(VK) only on primary root window,
this CL did
1. Shell takes ownership of keyboard controller(KC) instead of
RootWindowController
2. keyboard container window is owned by KC instead of its parent
There should only be one KC and one keyboard container at any time after
this change. keyboard container can be dynamically enabled/disabled on a
RootWindowController at runtime. If you want to do that,
you should DisableKeyboard on the previous RootWindowController first and
then EnableKeyboard on the new RootWindowController.
BUG=297858
TEST=
1. enable virtual keyboard from about::/flags on a Chromebook
2. plug in an external monitor
verify only one virtual keyboard shows
Review URL: https://codereview.chromium.org/25111002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.h')
-rw-r--r-- | ash/shell.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ash/shell.h b/ash/shell.h index f3d47e8..d7a6632 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -49,6 +49,11 @@ class ImageSkia; class Point; class Rect; } + +namespace keyboard { +class KeyboardController; +} + namespace ui { class Layer; } @@ -276,6 +281,10 @@ class ASH_EXPORT Shell void AddShellObserver(ShellObserver* observer); void RemoveShellObserver(ShellObserver* observer); + keyboard::KeyboardController* keyboard_controller() { + return keyboard_controller_.get(); + } + AcceleratorController* accelerator_controller() { return accelerator_controller_.get(); } @@ -502,6 +511,9 @@ class ASH_EXPORT Shell void Init(); + // Initializes virtual keyboard controller and attaches it to |root|. + void InitKeyboard(internal::RootWindowController* root); + // Initializes the root window and root window controller so that it // can host browser windows. |first_run_after_boot| is true for the // primary display only first time after boot. @@ -540,6 +552,7 @@ class ASH_EXPORT Shell std::vector<WindowAndBoundsPair> to_restore_; + scoped_ptr<keyboard::KeyboardController> keyboard_controller_; scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; scoped_ptr<AcceleratorController> accelerator_controller_; scoped_ptr<ShellDelegate> delegate_; |