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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebScrollbarThemeGeometryNative.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef WebScrollbarThemeGeometryNative_h 26 #ifndef WebScrollbarThemeGeometryNative_h
27 #define WebScrollbarThemeGeometryNative_h 27 #define WebScrollbarThemeGeometryNative_h
28 28
29 #include "platform/PlatformExport.h" 29 #include "platform/PlatformExport.h"
30 #include "public/platform/WebRect.h" 30 #include "public/platform/WebRect.h"
31 #include "public/platform/WebScrollbarThemeGeometry.h" 31 #include "public/platform/WebScrollbarThemeGeometry.h"
32 #include "wtf/Allocator.h" 32 #include "wtf/Allocator.h"
33 #include "wtf/Noncopyable.h" 33 #include "wtf/Noncopyable.h"
34 #include "wtf/PassOwnPtr.h" 34 #include <memory>
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class ScrollbarTheme; 38 class ScrollbarTheme;
39 class WebScrollbar; 39 class WebScrollbar;
40 40
41 class PLATFORM_EXPORT WebScrollbarThemeGeometryNative : public WebScrollbarTheme Geometry { 41 class PLATFORM_EXPORT WebScrollbarThemeGeometryNative : public WebScrollbarTheme Geometry {
42 USING_FAST_MALLOC(WebScrollbarThemeGeometryNative); 42 USING_FAST_MALLOC(WebScrollbarThemeGeometryNative);
43 WTF_MAKE_NONCOPYABLE(WebScrollbarThemeGeometryNative); 43 WTF_MAKE_NONCOPYABLE(WebScrollbarThemeGeometryNative);
44 public: 44 public:
45 static PassOwnPtr<WebScrollbarThemeGeometryNative> create(ScrollbarTheme&); 45 static std::unique_ptr<WebScrollbarThemeGeometryNative> create(ScrollbarThem e&);
46 46
47 bool hasButtons(WebScrollbar*) override; 47 bool hasButtons(WebScrollbar*) override;
48 bool hasThumb(WebScrollbar*) override; 48 bool hasThumb(WebScrollbar*) override;
49 WebRect trackRect(WebScrollbar*) override; 49 WebRect trackRect(WebScrollbar*) override;
50 WebRect thumbRect(WebScrollbar*) override; 50 WebRect thumbRect(WebScrollbar*) override;
51 WebRect backButtonStartRect(WebScrollbar*) override; 51 WebRect backButtonStartRect(WebScrollbar*) override;
52 WebRect backButtonEndRect(WebScrollbar*) override; 52 WebRect backButtonEndRect(WebScrollbar*) override;
53 WebRect forwardButtonStartRect(WebScrollbar*) override; 53 WebRect forwardButtonStartRect(WebScrollbar*) override;
54 WebRect forwardButtonEndRect(WebScrollbar*) override; 54 WebRect forwardButtonEndRect(WebScrollbar*) override;
55 55
56 private: 56 private:
57 explicit WebScrollbarThemeGeometryNative(ScrollbarTheme&); 57 explicit WebScrollbarThemeGeometryNative(ScrollbarTheme&);
58 58
59 // The theme is not owned by this class. It is assumed that the theme is a 59 // The theme is not owned by this class. It is assumed that the theme is a
60 // static pointer and its lifetime is essentially infinite. Only thread-safe 60 // static pointer and its lifetime is essentially infinite. Only thread-safe
61 // functions on the theme can be called by this theme. 61 // functions on the theme can be called by this theme.
62 ScrollbarTheme& m_theme; 62 ScrollbarTheme& m_theme;
63 }; 63 };
64 64
65 } // namespace blink 65 } // namespace blink
66 66
67 #endif 67 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698