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

Side by Side Diff: ash/keyboard/keyboard_ui.h

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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
« no previous file with comments | « ash/host/transformer_helper.cc ('k') | ash/keyboard/keyboard_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_KEYBOARD_KEYBOARD_UI_H_ 5 #ifndef ASH_KEYBOARD_KEYBOARD_UI_H_
6 #define ASH_KEYBOARD_KEYBOARD_UI_H_ 6 #define ASH_KEYBOARD_KEYBOARD_UI_H_
7 7
8 #include <memory>
9
8 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/observer_list.h" 12 #include "base/observer_list.h"
12 13
13 namespace ash { 14 namespace ash {
14 15
15 class KeyboardUIObserver; 16 class KeyboardUIObserver;
16 17
17 // KeyboardUI wraps the appropriate keyboard ui depending upon whether ash is 18 // KeyboardUI wraps the appropriate keyboard ui depending upon whether ash is
18 // running in mus or non-mus. 19 // running in mus or non-mus.
19 class ASH_EXPORT KeyboardUI { 20 class ASH_EXPORT KeyboardUI {
20 public: 21 public:
21 virtual ~KeyboardUI(); 22 virtual ~KeyboardUI();
22 23
23 static scoped_ptr<KeyboardUI> Create(); 24 static std::unique_ptr<KeyboardUI> Create();
24 25
25 virtual void Show() = 0; 26 virtual void Show() = 0;
26 virtual void Hide() = 0; 27 virtual void Hide() = 0;
27 28
28 // Returns true if the keyboard is enabled. 29 // Returns true if the keyboard is enabled.
29 virtual bool IsEnabled() = 0; 30 virtual bool IsEnabled() = 0;
30 31
31 void AddObserver(KeyboardUIObserver* observer); 32 void AddObserver(KeyboardUIObserver* observer);
32 void RemoveObserver(KeyboardUIObserver* observer); 33 void RemoveObserver(KeyboardUIObserver* observer);
33 34
34 // Applist also queries this for bounds. If app list remains in ash then 35 // Applist also queries this for bounds. If app list remains in ash then
35 // we need to plumb bounds through here too. 36 // we need to plumb bounds through here too.
36 37
37 protected: 38 protected:
38 KeyboardUI(); 39 KeyboardUI();
39 40
40 base::ObserverList<KeyboardUIObserver>* observers() { return &observers_; } 41 base::ObserverList<KeyboardUIObserver>* observers() { return &observers_; }
41 42
42 private: 43 private:
43 base::ObserverList<KeyboardUIObserver> observers_; 44 base::ObserverList<KeyboardUIObserver> observers_;
44 }; 45 };
45 46
46 } // namespace ash 47 } // namespace ash
47 48
48 #endif // ASH_KEYBOARD_KEYBOARD_UI_H_ 49 #endif // ASH_KEYBOARD_KEYBOARD_UI_H_
OLDNEW
« no previous file with comments | « ash/host/transformer_helper.cc ('k') | ash/keyboard/keyboard_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698