| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ | |
| 6 #define ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "ash/shell_observer.h" | |
| 10 #include "base/compiler_specific.h" | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "ui/gfx/display.h" | |
| 13 | |
| 14 namespace keyboard { | |
| 15 class KeyboardController; | |
| 16 } | |
| 17 | |
| 18 namespace ash { | |
| 19 class DisplayInfo; | |
| 20 class RootWindowController; | |
| 21 | |
| 22 namespace test { | |
| 23 class VirtualKeyboardWindowControllerTest; | |
| 24 } // namespace test | |
| 25 | |
| 26 // This class maintains the RootWindowController dedicated for | |
| 27 // virtual keyboard. | |
| 28 class ASH_EXPORT VirtualKeyboardWindowController : public ShellObserver { | |
| 29 public: | |
| 30 VirtualKeyboardWindowController(); | |
| 31 virtual ~VirtualKeyboardWindowController(); | |
| 32 | |
| 33 void ActivateKeyboard(keyboard::KeyboardController* keyboard_controller); | |
| 34 | |
| 35 // Updates the root window's bounds using |display_info|. | |
| 36 // Creates the new root window if one doesn't exist. | |
| 37 void UpdateWindow(const DisplayInfo& display_info); | |
| 38 | |
| 39 // Close the mirror window. | |
| 40 void Close(); | |
| 41 | |
| 42 // ShellObserver: | |
| 43 virtual void OnMaximizeModeStarted() OVERRIDE; | |
| 44 virtual void OnMaximizeModeEnded() OVERRIDE; | |
| 45 | |
| 46 private: | |
| 47 friend class test::VirtualKeyboardWindowControllerTest; | |
| 48 | |
| 49 // Rotates virtual keyboard display by 180 degrees. | |
| 50 void FlipDisplay(); | |
| 51 | |
| 52 RootWindowController* root_window_controller_for_test() { | |
| 53 return root_window_controller_.get(); | |
| 54 } | |
| 55 | |
| 56 scoped_ptr<RootWindowController> root_window_controller_; | |
| 57 | |
| 58 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowController); | |
| 59 }; | |
| 60 | |
| 61 } // namespace ash | |
| 62 | |
| 63 #endif // ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ | |
| OLD | NEW |