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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_client_impl.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
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_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 friend class WindowTreeClientImplPrivate; 131 friend class WindowTreeClientImplPrivate;
132 132
133 enum class NewWindowType { 133 enum class NewWindowType {
134 CHILD, 134 CHILD,
135 TOP_LEVEL, 135 TOP_LEVEL,
136 }; 136 };
137 137
138 using IdToWindowMap = std::map<Id, Window*>; 138 using IdToWindowMap = std::map<Id, Window*>;
139 139
140 // TODO(sky): this assumes change_ids never wrap, which is a bad assumption. 140 // TODO(sky): this assumes change_ids never wrap, which is a bad assumption.
141 using InFlightMap = std::map<uint32_t, scoped_ptr<InFlightChange>>; 141 using InFlightMap = std::map<uint32_t, std::unique_ptr<InFlightChange>>;
142 142
143 // Returns the oldest InFlightChange that matches |change|. 143 // Returns the oldest InFlightChange that matches |change|.
144 InFlightChange* GetOldestInFlightChangeMatching(const InFlightChange& change); 144 InFlightChange* GetOldestInFlightChangeMatching(const InFlightChange& change);
145 145
146 // See InFlightChange for details on how InFlightChanges are used. 146 // See InFlightChange for details on how InFlightChanges are used.
147 uint32_t ScheduleInFlightChange(scoped_ptr<InFlightChange> change); 147 uint32_t ScheduleInFlightChange(std::unique_ptr<InFlightChange> change);
148 148
149 // Returns true if there is an InFlightChange that matches |change|. If there 149 // Returns true if there is an InFlightChange that matches |change|. If there
150 // is an existing change SetRevertValueFrom() is invoked on it. Returns false 150 // is an existing change SetRevertValueFrom() is invoked on it. Returns false
151 // if there is no InFlightChange matching |change|. 151 // if there is no InFlightChange matching |change|.
152 // See InFlightChange for details on how InFlightChanges are used. 152 // See InFlightChange for details on how InFlightChanges are used.
153 bool ApplyServerChangeToExistingInFlightChange(const InFlightChange& change); 153 bool ApplyServerChangeToExistingInFlightChange(const InFlightChange& change);
154 154
155 Window* NewWindowImpl(NewWindowType type, 155 Window* NewWindowImpl(NewWindowType type,
156 const Window::SharedProperties* properties); 156 const Window::SharedProperties* properties);
157 157
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // Typically this is the value contained in |tree_ptr_|, but tests may 285 // Typically this is the value contained in |tree_ptr_|, but tests may
286 // directly set this. 286 // directly set this.
287 mojom::WindowTree* tree_; 287 mojom::WindowTree* tree_;
288 288
289 bool delete_on_no_roots_; 289 bool delete_on_no_roots_;
290 290
291 bool in_destructor_; 291 bool in_destructor_;
292 292
293 base::ObserverList<WindowTreeConnectionObserver> observers_; 293 base::ObserverList<WindowTreeConnectionObserver> observers_;
294 294
295 scoped_ptr<mojo::AssociatedBinding<mojom::WindowManager>> 295 std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManager>>
296 window_manager_internal_; 296 window_manager_internal_;
297 mojom::WindowManagerClientAssociatedPtr window_manager_internal_client_; 297 mojom::WindowManagerClientAssociatedPtr window_manager_internal_client_;
298 298
299 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); 299 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl);
300 }; 300 };
301 301
302 } // namespace mus 302 } // namespace mus
303 303
304 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ 304 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/window_surface.cc ('k') | components/mus/public/cpp/lib/window_tree_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698