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

Side by Side Diff: third_party/WebKit/public/platform/WebPrerender.h

Issue 1862593005: Prerender need to be on the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 /* 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #ifndef WebPrerender_h 31 #ifndef WebPrerender_h
32 #define WebPrerender_h 32 #define WebPrerender_h
33 33
34 #include "WebCommon.h" 34 #include "WebCommon.h"
35 #include "WebPrivatePtr.h" 35 #include "WebPrivatePtr.h"
36 #include "WebReferrerPolicy.h" 36 #include "WebReferrerPolicy.h"
37 #include "WebString.h" 37 #include "WebString.h"
38 #include "WebURL.h" 38 #include "WebURL.h"
39 39
40 #if INSIDE_BLINK
41 #include "wtf/PassRefPtr.h"
42 #endif
43
44 namespace blink { 40 namespace blink {
45 41
46 class Prerender; 42 class Prerender;
47 43
48 // WebPrerenderRelType is a bitfield since multiple rel attributes can be set on the same prerender. 44 // WebPrerenderRelType is a bitfield since multiple rel attributes can be set on the same prerender.
49 enum WebPrerenderRelType { 45 enum WebPrerenderRelType {
50 PrerenderRelTypePrerender = 0x1, 46 PrerenderRelTypePrerender = 0x1,
51 PrerenderRelTypeNext = 0x2, 47 PrerenderRelTypeNext = 0x2,
52 }; 48 };
53 49
54 class WebPrerender { 50 class WebPrerender {
55 public: 51 public:
56 class ExtraData { 52 class ExtraData {
57 public: 53 public:
58 virtual ~ExtraData() { } 54 virtual ~ExtraData() { }
59 }; 55 };
60 56
61 ~WebPrerender() { reset(); } 57 ~WebPrerender() { reset(); }
62 WebPrerender() { } 58 WebPrerender() { }
63 WebPrerender(const WebPrerender& other) { assign(other); } 59 WebPrerender(const WebPrerender& other) { assign(other); }
64 WebPrerender& operator=(const WebPrerender& other) 60 WebPrerender& operator=(const WebPrerender& other)
65 { 61 {
66 assign(other); 62 assign(other);
67 return *this; 63 return *this;
68 } 64 }
69 65
70 #if INSIDE_BLINK 66 #if INSIDE_BLINK
71 BLINK_PLATFORM_EXPORT explicit WebPrerender(PassRefPtr<Prerender>); 67 BLINK_PLATFORM_EXPORT explicit WebPrerender(Prerender*);
72 68
73 BLINK_PLATFORM_EXPORT const Prerender* toPrerender() const; 69 BLINK_PLATFORM_EXPORT const Prerender* toPrerender() const;
74 #endif 70 #endif
75 71
76 BLINK_PLATFORM_EXPORT void reset(); 72 BLINK_PLATFORM_EXPORT void reset();
77 BLINK_PLATFORM_EXPORT void assign(const WebPrerender&); 73 BLINK_PLATFORM_EXPORT void assign(const WebPrerender&);
78 BLINK_PLATFORM_EXPORT bool isNull() const; 74 BLINK_PLATFORM_EXPORT bool isNull() const;
79 75
80 BLINK_PLATFORM_EXPORT WebURL url() const; 76 BLINK_PLATFORM_EXPORT WebURL url() const;
81 BLINK_PLATFORM_EXPORT WebString referrer() const; 77 BLINK_PLATFORM_EXPORT WebString referrer() const;
82 BLINK_PLATFORM_EXPORT unsigned relTypes() const; 78 BLINK_PLATFORM_EXPORT unsigned relTypes() const;
83 BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const; 79 BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const;
84 80
85 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); 81 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
86 BLINK_PLATFORM_EXPORT const ExtraData* getExtraData() const; 82 BLINK_PLATFORM_EXPORT const ExtraData* getExtraData() const;
87 83
88 BLINK_PLATFORM_EXPORT void didStartPrerender(); 84 BLINK_PLATFORM_EXPORT void didStartPrerender();
89 BLINK_PLATFORM_EXPORT void didStopPrerender(); 85 BLINK_PLATFORM_EXPORT void didStopPrerender();
90 BLINK_PLATFORM_EXPORT void didSendLoadForPrerender(); 86 BLINK_PLATFORM_EXPORT void didSendLoadForPrerender();
91 BLINK_PLATFORM_EXPORT void didSendDOMContentLoadedForPrerender(); 87 BLINK_PLATFORM_EXPORT void didSendDOMContentLoadedForPrerender();
92 88
93 private: 89 private:
94 WebPrivatePtr<Prerender> m_private; 90 WebPrivatePtr<Prerender> m_private;
95 }; 91 };
96 92
97 } // namespace blink 93 } // namespace blink
98 94
99 #endif // WebPrerender_h 95 #endif // WebPrerender_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698