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

Side by Side Diff: ui/wm/core/shadow.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/wm/core/image_grid_unittest.cc ('k') | ui/wm/core/shadow_controller_unittest.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 (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_WM_CORE_SHADOW_H_ 5 #ifndef UI_WM_CORE_SHADOW_H_
6 #define UI_WM_CORE_SHADOW_H_ 6 #define UI_WM_CORE_SHADOW_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/compositor/layer_animation_observer.h" 11 #include "ui/compositor/layer_animation_observer.h"
11 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
12 #include "ui/wm/wm_export.h" 13 #include "ui/wm/wm_export.h"
13 14
14 namespace ui { 15 namespace ui {
15 class Layer; 16 class Layer;
16 } // namespace ui 17 } // namespace ui
17 18
18 namespace wm { 19 namespace wm {
19 20
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 63
63 // Updates the shadow layer bounds based on the inteior inset and the current 64 // Updates the shadow layer bounds based on the inteior inset and the current
64 // |content_bounds_|. 65 // |content_bounds_|.
65 void UpdateLayerBounds(); 66 void UpdateLayerBounds();
66 67
67 // The current style, set when the transition animation starts. 68 // The current style, set when the transition animation starts.
68 Style style_; 69 Style style_;
69 70
70 // The parent layer of the shadow layer. It serves as a container accessible 71 // The parent layer of the shadow layer. It serves as a container accessible
71 // from the outside to control the visibility of the shadow. 72 // from the outside to control the visibility of the shadow.
72 scoped_ptr<ui::Layer> layer_; 73 std::unique_ptr<ui::Layer> layer_;
73 74
74 // The actual shadow layer corresponding to a cc::NinePatchLayer. 75 // The actual shadow layer corresponding to a cc::NinePatchLayer.
75 scoped_ptr<ui::Layer> shadow_layer_; 76 std::unique_ptr<ui::Layer> shadow_layer_;
76 77
77 // Size of the current shadow image. 78 // Size of the current shadow image.
78 gfx::Size image_size_; 79 gfx::Size image_size_;
79 80
80 // Bounds of the content that the shadow encloses. 81 // Bounds of the content that the shadow encloses.
81 gfx::Rect content_bounds_; 82 gfx::Rect content_bounds_;
82 83
83 // The interior inset of the shadow images. The content bounds of the image 84 // The interior inset of the shadow images. The content bounds of the image
84 // grid should be set to |content_bounds_| inset by this amount. 85 // grid should be set to |content_bounds_| inset by this amount.
85 int interior_inset_; 86 int interior_inset_;
86 87
87 DISALLOW_COPY_AND_ASSIGN(Shadow); 88 DISALLOW_COPY_AND_ASSIGN(Shadow);
88 }; 89 };
89 90
90 } // namespace wm 91 } // namespace wm
91 92
92 #endif // UI_WM_CORE_SHADOW_H_ 93 #endif // UI_WM_CORE_SHADOW_H_
OLDNEW
« no previous file with comments | « ui/wm/core/image_grid_unittest.cc ('k') | ui/wm/core/shadow_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698