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

Side by Side Diff: ui/views/animation/ink_drop_host_view.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/views/animation/ink_drop_host.h ('k') | ui/views/animation/ink_drop_host_view.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_ANIMATION_INK_DROP_HOST_VIEW_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/geometry/size.h" 11 #include "ui/gfx/geometry/size.h"
11 #include "ui/views/animation/ink_drop_host.h" 12 #include "ui/views/animation/ink_drop_host.h"
12 #include "ui/views/view.h" 13 #include "ui/views/view.h"
13 14
14 namespace views { 15 namespace views {
15 16
16 class InkDropAnimation; 17 class InkDropAnimation;
17 class InkDropHover; 18 class InkDropHover;
18 19
19 // A view that provides InkDropHost functionality. 20 // A view that provides InkDropHost functionality.
20 class VIEWS_EXPORT InkDropHostView : public views::View, public InkDropHost { 21 class VIEWS_EXPORT InkDropHostView : public views::View, public InkDropHost {
21 public: 22 public:
22 InkDropHostView(); 23 InkDropHostView();
23 ~InkDropHostView() override; 24 ~InkDropHostView() override;
24 25
25 // Overridden from views::InkDropHost: 26 // Overridden from views::InkDropHost:
26 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; 27 void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
27 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; 28 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
28 scoped_ptr<InkDropAnimation> CreateInkDropAnimation() const override; 29 std::unique_ptr<InkDropAnimation> CreateInkDropAnimation() const override;
29 scoped_ptr<InkDropHover> CreateInkDropHover() const override; 30 std::unique_ptr<InkDropHover> CreateInkDropHover() const override;
30 31
31 void set_ink_drop_size(const gfx::Size& size) { ink_drop_size_ = size; } 32 void set_ink_drop_size(const gfx::Size& size) { ink_drop_size_ = size; }
32 33
33 protected: 34 protected:
34 static const int kInkDropSmallCornerRadius; 35 static const int kInkDropSmallCornerRadius;
35 36
36 // Overrideable methods to allow views to provide minor tweaks to the default 37 // Overrideable methods to allow views to provide minor tweaks to the default
37 // ink drop. 38 // ink drop.
38 virtual gfx::Point GetInkDropCenter() const; 39 virtual gfx::Point GetInkDropCenter() const;
39 virtual SkColor GetInkDropBaseColor() const; 40 virtual SkColor GetInkDropBaseColor() const;
40 41
41 private: 42 private:
42 gfx::Size ink_drop_size_; 43 gfx::Size ink_drop_size_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(InkDropHostView); 45 DISALLOW_COPY_AND_ASSIGN(InkDropHostView);
45 }; 46 };
46 } 47 }
47 48
48 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ 49 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_host.h ('k') | ui/views/animation/ink_drop_host_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698