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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.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_WINDOW_TREE_HOST_X11_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <X11/extensions/shape.h> 10 #include <X11/extensions/shape.h>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 ::Region GetWindowShape() const; 73 ::Region GetWindowShape() const;
74 74
75 // Called by X11DesktopHandler to notify us that the native windowing system 75 // Called by X11DesktopHandler to notify us that the native windowing system
76 // has changed our activation. 76 // has changed our activation.
77 void HandleNativeWidgetActivationChanged(bool active); 77 void HandleNativeWidgetActivationChanged(bool active);
78 78
79 void AddObserver(views::DesktopWindowTreeHostObserverX11* observer); 79 void AddObserver(views::DesktopWindowTreeHostObserverX11* observer);
80 void RemoveObserver(views::DesktopWindowTreeHostObserverX11* observer); 80 void RemoveObserver(views::DesktopWindowTreeHostObserverX11* observer);
81 81
82 // Swaps the current handler for events in the non client view with |handler|. 82 // Swaps the current handler for events in the non client view with |handler|.
83 void SwapNonClientEventHandler(scoped_ptr<ui::EventHandler> handler); 83 void SwapNonClientEventHandler(std::unique_ptr<ui::EventHandler> handler);
84 84
85 // Runs the |func| callback for each content-window, and deallocates the 85 // Runs the |func| callback for each content-window, and deallocates the
86 // internal list of open windows. 86 // internal list of open windows.
87 static void CleanUpWindowList(void (*func)(aura::Window* window)); 87 static void CleanUpWindowList(void (*func)(aura::Window* window));
88 88
89 protected: 89 protected:
90 // Overridden from DesktopWindowTreeHost: 90 // Overridden from DesktopWindowTreeHost:
91 void Init(aura::Window* content_window, 91 void Init(aura::Window* content_window,
92 const Widget::InitParams& params) override; 92 const Widget::InitParams& params) override;
93 void OnNativeWidgetCreated(const Widget::InitParams& params) override; 93 void OnNativeWidgetCreated(const Widget::InitParams& params) override;
94 scoped_ptr<corewm::Tooltip> CreateTooltip() override; 94 std::unique_ptr<corewm::Tooltip> CreateTooltip() override;
95 scoped_ptr<aura::client::DragDropClient> CreateDragDropClient( 95 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient(
96 DesktopNativeCursorManager* cursor_manager) override; 96 DesktopNativeCursorManager* cursor_manager) override;
97 void Close() override; 97 void Close() override;
98 void CloseNow() override; 98 void CloseNow() override;
99 aura::WindowTreeHost* AsWindowTreeHost() override; 99 aura::WindowTreeHost* AsWindowTreeHost() override;
100 void ShowWindowWithState(ui::WindowShowState show_state) override; 100 void ShowWindowWithState(ui::WindowShowState show_state) override;
101 void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override; 101 void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override;
102 bool IsVisible() const override; 102 bool IsVisible() const override;
103 void SetSize(const gfx::Size& requested_size) override; 103 void SetSize(const gfx::Size& requested_size) override;
104 void StackAbove(aura::Window* window) override; 104 void StackAbove(aura::Window* window) override;
105 void StackAtTop() override; 105 void StackAtTop() override;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 bool use_native_frame_; 293 bool use_native_frame_;
294 294
295 // True if a Maximize() call should be done after mapping the window. 295 // True if a Maximize() call should be done after mapping the window.
296 bool should_maximize_after_map_; 296 bool should_maximize_after_map_;
297 297
298 // Whether we used an ARGB visual for our window. 298 // Whether we used an ARGB visual for our window.
299 bool use_argb_visual_; 299 bool use_argb_visual_;
300 300
301 DesktopDragDropClientAuraX11* drag_drop_client_; 301 DesktopDragDropClientAuraX11* drag_drop_client_;
302 302
303 scoped_ptr<ui::EventHandler> x11_non_client_event_filter_; 303 std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
304 scoped_ptr<X11DesktopWindowMoveClient> x11_window_move_client_; 304 std::unique_ptr<X11DesktopWindowMoveClient> x11_window_move_client_;
305 305
306 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura 306 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura
307 // instead of providing this route back to Widget. 307 // instead of providing this route back to Widget.
308 internal::NativeWidgetDelegate* native_widget_delegate_; 308 internal::NativeWidgetDelegate* native_widget_delegate_;
309 309
310 DesktopNativeWidgetAura* desktop_native_widget_aura_; 310 DesktopNativeWidgetAura* desktop_native_widget_aura_;
311 311
312 aura::Window* content_window_; 312 aura::Window* content_window_;
313 313
314 // We can optionally have a parent which can order us to close, or own 314 // We can optionally have a parent which can order us to close, or own
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 base::CancelableCallback<void()> delayed_resize_task_; 349 base::CancelableCallback<void()> delayed_resize_task_;
350 350
351 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; 351 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
352 352
353 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); 353 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
354 }; 354 };
355 355
356 } // namespace views 356 } // namespace views
357 357
358 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 358 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698