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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.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_WIN_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/aura/window_tree_host.h" 9 #include "ui/aura/window_tree_host.h"
10 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
(...skipping 30 matching lines...) Expand all
41 ~DesktopWindowTreeHostWin() override; 41 ~DesktopWindowTreeHostWin() override;
42 42
43 // A way of converting an HWND into a content window. 43 // A way of converting an HWND into a content window.
44 static aura::Window* GetContentWindowForHWND(HWND hwnd); 44 static aura::Window* GetContentWindowForHWND(HWND hwnd);
45 45
46 protected: 46 protected:
47 // Overridden from DesktopWindowTreeHost: 47 // Overridden from DesktopWindowTreeHost:
48 void Init(aura::Window* content_window, 48 void Init(aura::Window* content_window,
49 const Widget::InitParams& params) override; 49 const Widget::InitParams& params) override;
50 void OnNativeWidgetCreated(const Widget::InitParams& params) override; 50 void OnNativeWidgetCreated(const Widget::InitParams& params) override;
51 scoped_ptr<corewm::Tooltip> CreateTooltip() override; 51 std::unique_ptr<corewm::Tooltip> CreateTooltip() override;
52 scoped_ptr<aura::client::DragDropClient> CreateDragDropClient( 52 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient(
53 DesktopNativeCursorManager* cursor_manager) override; 53 DesktopNativeCursorManager* cursor_manager) override;
54 void Close() override; 54 void Close() override;
55 void CloseNow() override; 55 void CloseNow() override;
56 aura::WindowTreeHost* AsWindowTreeHost() override; 56 aura::WindowTreeHost* AsWindowTreeHost() override;
57 void ShowWindowWithState(ui::WindowShowState show_state) override; 57 void ShowWindowWithState(ui::WindowShowState show_state) override;
58 void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override; 58 void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override;
59 bool IsVisible() const override; 59 bool IsVisible() const override;
60 void SetSize(const gfx::Size& size) override; 60 void SetSize(const gfx::Size& size) override;
61 void StackAbove(aura::Window* window) override; 61 void StackAbove(aura::Window* window) override;
62 void StackAtTop() override; 62 void StackAtTop() override;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 Widget* GetWidget(); 198 Widget* GetWidget();
199 const Widget* GetWidget() const; 199 const Widget* GetWidget() const;
200 HWND GetHWND() const; 200 HWND GetHWND() const;
201 201
202 private: 202 private:
203 void SetWindowTransparency(); 203 void SetWindowTransparency();
204 204
205 // Returns true if a modal window is active in the current root window chain. 205 // Returns true if a modal window is active in the current root window chain.
206 bool IsModalWindowActive() const; 206 bool IsModalWindowActive() const;
207 207
208 scoped_ptr<HWNDMessageHandler> message_handler_; 208 std::unique_ptr<HWNDMessageHandler> message_handler_;
209 scoped_ptr<aura::client::FocusClient> focus_client_; 209 std::unique_ptr<aura::client::FocusClient> focus_client_;
210 210
211 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura 211 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura
212 // instead of providing this route back to Widget. 212 // instead of providing this route back to Widget.
213 internal::NativeWidgetDelegate* native_widget_delegate_; 213 internal::NativeWidgetDelegate* native_widget_delegate_;
214 214
215 DesktopNativeWidgetAura* desktop_native_widget_aura_; 215 DesktopNativeWidgetAura* desktop_native_widget_aura_;
216 216
217 aura::Window* content_window_; 217 aura::Window* content_window_;
218 218
219 // Owned by DesktopNativeWidgetAura. 219 // Owned by DesktopNativeWidgetAura.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // Owned by TooltipController, but we need to forward events to it so we keep 251 // Owned by TooltipController, but we need to forward events to it so we keep
252 // a reference. 252 // a reference.
253 corewm::TooltipWin* tooltip_; 253 corewm::TooltipWin* tooltip_;
254 254
255 // Visibility of the cursor. On Windows we can have multiple root windows and 255 // Visibility of the cursor. On Windows we can have multiple root windows and
256 // the implementation of ::ShowCursor() is based on a counter, so making this 256 // the implementation of ::ShowCursor() is based on a counter, so making this
257 // member static ensures that ::ShowCursor() is always called exactly once 257 // member static ensures that ::ShowCursor() is always called exactly once
258 // whenever the cursor visibility state changes. 258 // whenever the cursor visibility state changes.
259 static bool is_cursor_visible_; 259 static bool is_cursor_visible_;
260 260
261 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; 261 std::unique_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_;
262 262
263 // Indicates if current window will receive mouse events when should not 263 // Indicates if current window will receive mouse events when should not
264 // become activated. 264 // become activated.
265 bool wants_mouse_events_when_inactive_ = false; 265 bool wants_mouse_events_when_inactive_ = false;
266 266
267 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWin); 267 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWin);
268 }; 268 };
269 269
270 } // namespace views 270 } // namespace views
271 271
272 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_ 272 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698