OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_MANAGER_H_ | 5 #ifndef UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_MANAGER_H_ |
6 #define UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_MANAGER_H_ | 6 #define UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_MANAGER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "ui/events/ozone/layout/events_ozone_layout_export.h" | 11 #include "ui/events/ozone/layout/events_ozone_layout_export.h" |
11 | 12 |
12 namespace ui { | 13 namespace ui { |
13 | 14 |
14 class KeyboardLayoutEngine; | 15 class KeyboardLayoutEngine; |
15 | 16 |
16 class EVENTS_OZONE_LAYOUT_EXPORT KeyboardLayoutEngineManager { | 17 class EVENTS_OZONE_LAYOUT_EXPORT KeyboardLayoutEngineManager { |
17 public: | 18 public: |
18 virtual ~KeyboardLayoutEngineManager(); | 19 virtual ~KeyboardLayoutEngineManager(); |
19 | 20 |
20 static void SetKeyboardLayoutEngine(scoped_ptr<KeyboardLayoutEngine> engine); | 21 static void SetKeyboardLayoutEngine( |
| 22 std::unique_ptr<KeyboardLayoutEngine> engine); |
21 static KeyboardLayoutEngine* GetKeyboardLayoutEngine(); | 23 static KeyboardLayoutEngine* GetKeyboardLayoutEngine(); |
22 | 24 |
23 private: | 25 private: |
24 KeyboardLayoutEngineManager(KeyboardLayoutEngine* engine); | 26 KeyboardLayoutEngineManager(KeyboardLayoutEngine* engine); |
25 | 27 |
26 static KeyboardLayoutEngineManager* instance_; | 28 static KeyboardLayoutEngineManager* instance_; |
27 scoped_ptr<KeyboardLayoutEngine> keyboard_layout_engine_; | 29 std::unique_ptr<KeyboardLayoutEngine> keyboard_layout_engine_; |
28 | 30 |
29 DISALLOW_COPY_AND_ASSIGN(KeyboardLayoutEngineManager); | 31 DISALLOW_COPY_AND_ASSIGN(KeyboardLayoutEngineManager); |
30 }; | 32 }; |
31 | 33 |
32 } // namespace ui | 34 } // namespace ui |
33 | 35 |
34 #endif // UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_MANAGER_H_ | 36 #endif // UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_MANAGER_H_ |
OLD | NEW |