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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "ui/aura/client/focus_change_observer.h" 10 #include "ui/aura/client/focus_change_observer.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 private: 228 private:
229 friend class FocusManagerEventHandler; 229 friend class FocusManagerEventHandler;
230 friend class RootWindowDestructionObserver; 230 friend class RootWindowDestructionObserver;
231 231
232 // To save a clear on platforms where the window is never transparent, the 232 // To save a clear on platforms where the window is never transparent, the
233 // window is only set as transparent when the glass frame is in use. 233 // window is only set as transparent when the glass frame is in use.
234 void UpdateWindowTransparency(); 234 void UpdateWindowTransparency();
235 235
236 void RootWindowDestroyed(); 236 void RootWindowDestroyed();
237 237
238 scoped_ptr<aura::WindowTreeHost> host_; 238 std::unique_ptr<aura::WindowTreeHost> host_;
239 DesktopWindowTreeHost* desktop_window_tree_host_; 239 DesktopWindowTreeHost* desktop_window_tree_host_;
240 240
241 // See class documentation for Widget in widget.h for a note about ownership. 241 // See class documentation for Widget in widget.h for a note about ownership.
242 Widget::InitParams::Ownership ownership_; 242 Widget::InitParams::Ownership ownership_;
243 243
244 scoped_ptr<DesktopCaptureClient> capture_client_; 244 std::unique_ptr<DesktopCaptureClient> capture_client_;
245 245
246 // Child of the root, contains |content_window_|. 246 // Child of the root, contains |content_window_|.
247 aura::Window* content_window_container_; 247 aura::Window* content_window_container_;
248 248
249 // Child of |content_window_container_|. This is the return value from 249 // Child of |content_window_container_|. This is the return value from
250 // GetNativeView(). 250 // GetNativeView().
251 // WARNING: this may be NULL, in particular during shutdown it becomes NULL. 251 // WARNING: this may be NULL, in particular during shutdown it becomes NULL.
252 aura::Window* content_window_; 252 aura::Window* content_window_;
253 253
254 internal::NativeWidgetDelegate* native_widget_delegate_; 254 internal::NativeWidgetDelegate* native_widget_delegate_;
255 255
256 scoped_ptr<wm::FocusController> focus_client_; 256 std::unique_ptr<wm::FocusController> focus_client_;
257 scoped_ptr<aura::client::ScreenPositionClient> position_client_; 257 std::unique_ptr<aura::client::ScreenPositionClient> position_client_;
258 scoped_ptr<aura::client::DragDropClient> drag_drop_client_; 258 std::unique_ptr<aura::client::DragDropClient> drag_drop_client_;
259 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; 259 std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_;
260 scoped_ptr<DesktopEventClient> event_client_; 260 std::unique_ptr<DesktopEventClient> event_client_;
261 scoped_ptr<FocusManagerEventHandler> focus_manager_event_handler_; 261 std::unique_ptr<FocusManagerEventHandler> focus_manager_event_handler_;
262 262
263 // Toplevel event filter which dispatches to other event filters. 263 // Toplevel event filter which dispatches to other event filters.
264 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_; 264 std::unique_ptr<wm::CompoundEventFilter> root_window_event_filter_;
265 265
266 scoped_ptr<DropHelper> drop_helper_; 266 std::unique_ptr<DropHelper> drop_helper_;
267 int last_drop_operation_; 267 int last_drop_operation_;
268 268
269 scoped_ptr<corewm::TooltipController> tooltip_controller_; 269 std::unique_ptr<corewm::TooltipController> tooltip_controller_;
270 scoped_ptr<TooltipManagerAura> tooltip_manager_; 270 std::unique_ptr<TooltipManagerAura> tooltip_manager_;
271 271
272 scoped_ptr<wm::VisibilityController> visibility_controller_; 272 std::unique_ptr<wm::VisibilityController> visibility_controller_;
273 273
274 scoped_ptr<wm::WindowModalityController> 274 std::unique_ptr<wm::WindowModalityController> window_modality_controller_;
275 window_modality_controller_;
276 275
277 bool restore_focus_on_activate_; 276 bool restore_focus_on_activate_;
278 277
279 gfx::NativeCursor cursor_; 278 gfx::NativeCursor cursor_;
280 // We must manually reference count the number of users of |cursor_manager_| 279 // We must manually reference count the number of users of |cursor_manager_|
281 // because the cursors created by |cursor_manager_| are shared among the 280 // because the cursors created by |cursor_manager_| are shared among the
282 // DNWAs. We can't just stuff this in a LazyInstance because we need to 281 // DNWAs. We can't just stuff this in a LazyInstance because we need to
283 // destroy this as the last DNWA happens; we can't put it off until 282 // destroy this as the last DNWA happens; we can't put it off until
284 // (potentially) after we tear down the X11 connection because that's a 283 // (potentially) after we tear down the X11 connection because that's a
285 // crash. 284 // crash.
286 static int cursor_reference_count_; 285 static int cursor_reference_count_;
287 static wm::CursorManager* cursor_manager_; 286 static wm::CursorManager* cursor_manager_;
288 static views::DesktopNativeCursorManager* native_cursor_manager_; 287 static views::DesktopNativeCursorManager* native_cursor_manager_;
289 288
290 scoped_ptr<wm::ShadowController> shadow_controller_; 289 std::unique_ptr<wm::ShadowController> shadow_controller_;
291 290
292 // Reorders child windows of |window_| associated with a view based on the 291 // Reorders child windows of |window_| associated with a view based on the
293 // order of the associated views in the widget's view hierarchy. 292 // order of the associated views in the widget's view hierarchy.
294 scoped_ptr<WindowReorderer> window_reorderer_; 293 std::unique_ptr<WindowReorderer> window_reorderer_;
295 294
296 // See class documentation for Widget in widget.h for a note about type. 295 // See class documentation for Widget in widget.h for a note about type.
297 Widget::InitParams::Type widget_type_; 296 Widget::InitParams::Type widget_type_;
298 297
299 // The following factory is used for calls to close the NativeWidgetAura 298 // The following factory is used for calls to close the NativeWidgetAura
300 // instance. 299 // instance.
301 base::WeakPtrFactory<DesktopNativeWidgetAura> close_widget_factory_; 300 base::WeakPtrFactory<DesktopNativeWidgetAura> close_widget_factory_;
302 301
303 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); 302 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura);
304 }; 303 };
305 304
306 } // namespace views 305 } // namespace views
307 306
308 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 307 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698