OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ | 5 #ifndef ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ |
6 #define ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ | 6 #define ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 | 11 |
12 namespace keyboard { | |
13 class KeyboardController; | |
14 } | |
15 | |
16 namespace ash { | 12 namespace ash { |
17 | 13 |
18 namespace test { | |
19 class VirtualKeyboardWindowControllerTest; | |
20 } // namespace test | |
21 | |
22 namespace internal { | 14 namespace internal { |
23 class DisplayInfo; | 15 class DisplayInfo; |
24 class RootWindowController; | 16 class RootWindowController; |
25 | 17 |
26 // This class maintains the RootWindowController dedicated for | 18 // This class maintains the RootWindowController dedicated for |
27 // virtual keyboard. | 19 // virtual keyboard. |
28 class ASH_EXPORT VirtualKeyboardWindowController { | 20 class ASH_EXPORT VirtualKeyboardWindowController { |
29 public: | 21 public: |
30 VirtualKeyboardWindowController(); | 22 VirtualKeyboardWindowController(); |
31 virtual ~VirtualKeyboardWindowController(); | 23 virtual ~VirtualKeyboardWindowController(); |
32 | 24 |
33 void ActivateKeyboard(keyboard::KeyboardController* keyboard_controller); | |
34 | |
35 // Updates the root window's bounds using |display_info|. | 25 // Updates the root window's bounds using |display_info|. |
36 // Creates the new root window if one doesn't exist. | 26 // Creates the new root window if one doesn't exist. |
37 void UpdateWindow(const DisplayInfo& display_info); | 27 void UpdateWindow(const DisplayInfo& display_info); |
38 | 28 |
39 // Close the mirror window. | 29 // Close the mirror window. |
40 void Close(); | 30 void Close(); |
41 | 31 |
42 private: | 32 private: |
43 friend class test::VirtualKeyboardWindowControllerTest; | |
44 | |
45 RootWindowController* root_window_controller_for_test() { | |
46 return root_window_controller_.get(); | |
47 } | |
48 | |
49 scoped_ptr<RootWindowController> root_window_controller_; | 33 scoped_ptr<RootWindowController> root_window_controller_; |
50 | 34 |
51 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowController); | 35 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowController); |
52 }; | 36 }; |
53 | 37 |
54 } // namespace internal | 38 } // namespace internal |
55 } // namespace ash | 39 } // namespace ash |
56 | 40 |
57 #endif // ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ | 41 #endif // ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_ |
OLD | NEW |