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

Side by Side Diff: ash/mus/keyboard_ui_mus.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/metrics/user_metrics_recorder_unittest.cc ('k') | ash/mus/keyboard_ui_mus.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_MUS_KEYBOARD_UI_MUS_H_ 5 #ifndef ASH_MUS_KEYBOARD_UI_MUS_H_
6 #define ASH_MUS_KEYBOARD_UI_MUS_H_ 6 #define ASH_MUS_KEYBOARD_UI_MUS_H_
7 7
8 #include <memory>
9
8 #include "ash/keyboard/keyboard_ui.h" 10 #include "ash/keyboard/keyboard_ui.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "mojo/public/cpp/bindings/binding.h" 12 #include "mojo/public/cpp/bindings/binding.h"
11 #include "ui/keyboard/keyboard.mojom.h" 13 #include "ui/keyboard/keyboard.mojom.h"
12 14
13 namespace mojo { 15 namespace mojo {
14 class Connector; 16 class Connector;
15 } 17 }
16 18
17 namespace ash { 19 namespace ash {
18 20
19 class KeyboardUIMus : public KeyboardUI, 21 class KeyboardUIMus : public KeyboardUI,
20 public keyboard::mojom::KeyboardObserver { 22 public keyboard::mojom::KeyboardObserver {
21 public: 23 public:
22 explicit KeyboardUIMus(mojo::Connector* connector); 24 explicit KeyboardUIMus(mojo::Connector* connector);
23 ~KeyboardUIMus() override; 25 ~KeyboardUIMus() override;
24 26
25 static scoped_ptr<KeyboardUI> Create(mojo::Connector* connector); 27 static std::unique_ptr<KeyboardUI> Create(mojo::Connector* connector);
26 28
27 // KeyboardUI: 29 // KeyboardUI:
28 void Hide() override; 30 void Hide() override;
29 void Show() override; 31 void Show() override;
30 bool IsEnabled() override; 32 bool IsEnabled() override;
31 33
32 // keyboard::mojom::KeyboardObserver: 34 // keyboard::mojom::KeyboardObserver:
33 void OnKeyboardStateChanged(bool is_enabled, 35 void OnKeyboardStateChanged(bool is_enabled,
34 bool is_visible, 36 bool is_visible,
35 uint64_t display_id, 37 uint64_t display_id,
36 mojo::RectPtr bounds) override; 38 mojo::RectPtr bounds) override;
37 39
38 private: 40 private:
39 bool is_enabled_; 41 bool is_enabled_;
40 42
41 keyboard::mojom::KeyboardPtr keyboard_; 43 keyboard::mojom::KeyboardPtr keyboard_;
42 mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_; 44 mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus); 46 DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus);
45 }; 47 };
46 48
47 } // namespace ash 49 } // namespace ash
48 50
49 #endif // ASH_MUS_KEYBOARD_UI_MUS_H_ 51 #endif // ASH_MUS_KEYBOARD_UI_MUS_H_
OLDNEW
« no previous file with comments | « ash/metrics/user_metrics_recorder_unittest.cc ('k') | ash/mus/keyboard_ui_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698