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

Side by Side Diff: components/mus/mus_app.h

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « components/mus/gles2/raster_thread_helper.h ('k') | components/mus/mus_app.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 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 COMPONENTS_MUS_MUS_APP_H_ 5 #ifndef COMPONENTS_MUS_MUS_APP_H_
6 #define COMPONENTS_MUS_MUS_APP_H_ 6 #define COMPONENTS_MUS_MUS_APP_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "components/mus/public/interfaces/display.mojom.h" 15 #include "components/mus/public/interfaces/display.mojom.h"
16 #include "components/mus/public/interfaces/gpu.mojom.h" 16 #include "components/mus/public/interfaces/gpu.mojom.h"
17 #include "components/mus/public/interfaces/user_access_manager.mojom.h" 17 #include "components/mus/public/interfaces/user_access_manager.mojom.h"
18 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" 18 #include "components/mus/public/interfaces/window_manager_factory.mojom.h"
19 #include "components/mus/public/interfaces/window_server_test.mojom.h" 19 #include "components/mus/public/interfaces/window_server_test.mojom.h"
20 #include "components/mus/public/interfaces/window_tree.mojom.h" 20 #include "components/mus/public/interfaces/window_tree.mojom.h"
21 #include "components/mus/public/interfaces/window_tree_host.mojom.h" 21 #include "components/mus/public/interfaces/window_tree_host.mojom.h"
22 #include "components/mus/ws/platform_display_init_params.h" 22 #include "components/mus/ws/platform_display_init_params.h"
23 #include "components/mus/ws/user_id.h" 23 #include "components/mus/ws/user_id.h"
24 #include "components/mus/ws/window_server_delegate.h" 24 #include "components/mus/ws/window_server_delegate.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 public: 58 public:
59 MandolineUIServicesApp(); 59 MandolineUIServicesApp();
60 ~MandolineUIServicesApp() override; 60 ~MandolineUIServicesApp() override;
61 61
62 private: 62 private:
63 // Holds InterfaceRequests received before the first WindowTreeHost Display 63 // Holds InterfaceRequests received before the first WindowTreeHost Display
64 // has been established. 64 // has been established.
65 struct PendingRequest; 65 struct PendingRequest;
66 struct UserState; 66 struct UserState;
67 67
68 using UserIdToUserState = std::map<ws::UserId, scoped_ptr<UserState>>; 68 using UserIdToUserState = std::map<ws::UserId, std::unique_ptr<UserState>>;
69 69
70 void InitializeResources(shell::Connector* connector); 70 void InitializeResources(shell::Connector* connector);
71 71
72 // Returns the user specific state for the user id of |connection|. MusApp 72 // Returns the user specific state for the user id of |connection|. MusApp
73 // owns the return value. 73 // owns the return value.
74 // TODO(sky): if we allow removal of user ids then we need to close anything 74 // TODO(sky): if we allow removal of user ids then we need to close anything
75 // associated with the user (all incoming pipes...) on removal. 75 // associated with the user (all incoming pipes...) on removal.
76 UserState* GetUserState(shell::Connection* connection); 76 UserState* GetUserState(shell::Connection* connection);
77 77
78 void AddUserIfNecessary(shell::Connection* connection); 78 void AddUserIfNecessary(shell::Connection* connection);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // shell::InterfaceFactory<mojom::WindowServerTest> implementation. 112 // shell::InterfaceFactory<mojom::WindowServerTest> implementation.
113 void Create(shell::Connection* connection, 113 void Create(shell::Connection* connection,
114 mojom::WindowServerTestRequest request) override; 114 mojom::WindowServerTestRequest request) override;
115 115
116 // shell::InterfaceFactory<mojom::Gpu> implementation. 116 // shell::InterfaceFactory<mojom::Gpu> implementation.
117 void Create(shell::Connection* connection, 117 void Create(shell::Connection* connection,
118 mojom::GpuRequest request) override; 118 mojom::GpuRequest request) override;
119 119
120 ws::PlatformDisplayInitParams platform_display_init_params_; 120 ws::PlatformDisplayInitParams platform_display_init_params_;
121 scoped_ptr<ws::WindowServer> window_server_; 121 std::unique_ptr<ws::WindowServer> window_server_;
122 scoped_ptr<ui::PlatformEventSource> event_source_; 122 std::unique_ptr<ui::PlatformEventSource> event_source_;
123 mojo::TracingImpl tracing_; 123 mojo::TracingImpl tracing_;
124 using PendingRequests = std::vector<scoped_ptr<PendingRequest>>; 124 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>;
125 PendingRequests pending_requests_; 125 PendingRequests pending_requests_;
126 126
127 UserIdToUserState user_id_to_user_state_; 127 UserIdToUserState user_id_to_user_state_;
128 128
129 bool test_config_; 129 bool test_config_;
130 #if defined(USE_OZONE) 130 #if defined(USE_OZONE)
131 scoped_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; 131 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_;
132 #endif 132 #endif
133 133
134 DISALLOW_COPY_AND_ASSIGN(MandolineUIServicesApp); 134 DISALLOW_COPY_AND_ASSIGN(MandolineUIServicesApp);
135 }; 135 };
136 136
137 } // namespace mus 137 } // namespace mus
138 138
139 #endif // COMPONENTS_MUS_MUS_APP_H_ 139 #endif // COMPONENTS_MUS_MUS_APP_H_
OLDNEW
« no previous file with comments | « components/mus/gles2/raster_thread_helper.h ('k') | components/mus/mus_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698