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

Side by Side Diff: ui/aura/window_tree_host_platform.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
« no previous file with comments | « ui/aura/window_tree_host.cc ('k') | ui/aura/window_tree_host_platform.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_AURA_WINDOW_TREE_HOST_PLATFORM_H_ 5 #ifndef UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_
6 #define UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_ 6 #define UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_
7 7
8 #include <memory>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/aura/aura_export.h" 12 #include "ui/aura/aura_export.h"
12 #include "ui/aura/window_tree_host.h" 13 #include "ui/aura/window_tree_host.h"
13 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
14 #include "ui/platform_window/platform_window.h" 15 #include "ui/platform_window/platform_window.h"
15 #include "ui/platform_window/platform_window_delegate.h" 16 #include "ui/platform_window/platform_window_delegate.h"
16 17
17 namespace aura { 18 namespace aura {
18 19
19 // The unified WindowTreeHost implementation for platforms 20 // The unified WindowTreeHost implementation for platforms
20 // that implement PlatformWindow. 21 // that implement PlatformWindow.
(...skipping 13 matching lines...) Expand all
34 void SetBounds(const gfx::Rect& bounds) override; 35 void SetBounds(const gfx::Rect& bounds) override;
35 gfx::Point GetLocationOnNativeScreen() const override; 36 gfx::Point GetLocationOnNativeScreen() const override;
36 void SetCapture() override; 37 void SetCapture() override;
37 void ReleaseCapture() override; 38 void ReleaseCapture() override;
38 void SetCursorNative(gfx::NativeCursor cursor) override; 39 void SetCursorNative(gfx::NativeCursor cursor) override;
39 void MoveCursorToNative(const gfx::Point& location) override; 40 void MoveCursorToNative(const gfx::Point& location) override;
40 void OnCursorVisibilityChangedNative(bool show) override; 41 void OnCursorVisibilityChangedNative(bool show) override;
41 42
42 protected: 43 protected:
43 WindowTreeHostPlatform(); 44 WindowTreeHostPlatform();
44 void SetPlatformWindow(scoped_ptr<ui::PlatformWindow> window); 45 void SetPlatformWindow(std::unique_ptr<ui::PlatformWindow> window);
45 ui::PlatformWindow* platform_window() { return window_.get(); } 46 ui::PlatformWindow* platform_window() { return window_.get(); }
46 47
47 // ui::PlatformWindowDelegate: 48 // ui::PlatformWindowDelegate:
48 void OnBoundsChanged(const gfx::Rect& new_bounds) override; 49 void OnBoundsChanged(const gfx::Rect& new_bounds) override;
49 void OnDamageRect(const gfx::Rect& damaged_region) override; 50 void OnDamageRect(const gfx::Rect& damaged_region) override;
50 void DispatchEvent(ui::Event* event) override; 51 void DispatchEvent(ui::Event* event) override;
51 void OnCloseRequest() override; 52 void OnCloseRequest() override;
52 void OnClosed() override; 53 void OnClosed() override;
53 void OnWindowStateChanged(ui::PlatformWindowState new_state) override; 54 void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
54 void OnLostCapture() override; 55 void OnLostCapture() override;
55 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, 56 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
56 float device_pixel_ratio) override; 57 float device_pixel_ratio) override;
57 void OnAcceleratedWidgetDestroyed() override; 58 void OnAcceleratedWidgetDestroyed() override;
58 void OnActivationChanged(bool active) override; 59 void OnActivationChanged(bool active) override;
59 60
60 private: 61 private:
61 gfx::AcceleratedWidget widget_; 62 gfx::AcceleratedWidget widget_;
62 scoped_ptr<ui::PlatformWindow> window_; 63 std::unique_ptr<ui::PlatformWindow> window_;
63 gfx::NativeCursor current_cursor_; 64 gfx::NativeCursor current_cursor_;
64 gfx::Rect bounds_; 65 gfx::Rect bounds_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostPlatform); 67 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostPlatform);
67 }; 68 };
68 69
69 } // namespace aura 70 } // namespace aura
70 71
71 #endif // UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_ 72 #endif // UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host.cc ('k') | ui/aura/window_tree_host_platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698