| OLD | NEW |
| 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 24 matching lines...) Expand all Loading... |
| 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 | 40 #if INSIDE_BLINK |
| 41 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 |
| 45 class Prerender; | 46 class Prerender; |
| 46 } | |
| 47 | |
| 48 namespace blink { | |
| 49 | 47 |
| 50 // WebPrerenderRelType is a bitfield since multiple rel attributes can be set on
the same prerender. | 48 // WebPrerenderRelType is a bitfield since multiple rel attributes can be set on
the same prerender. |
| 51 enum WebPrerenderRelType { | 49 enum WebPrerenderRelType { |
| 52 PrerenderRelTypePrerender = 0x1, | 50 PrerenderRelTypePrerender = 0x1, |
| 53 PrerenderRelTypeNext = 0x2, | 51 PrerenderRelTypeNext = 0x2, |
| 54 }; | 52 }; |
| 55 | 53 |
| 56 class WebPrerender { | 54 class WebPrerender { |
| 57 public: | 55 public: |
| 58 class ExtraData { | 56 class ExtraData { |
| 59 public: | 57 public: |
| 60 virtual ~ExtraData() { } | 58 virtual ~ExtraData() { } |
| 61 }; | 59 }; |
| 62 | 60 |
| 63 ~WebPrerender() { reset(); } | 61 ~WebPrerender() { reset(); } |
| 64 WebPrerender() { } | 62 WebPrerender() { } |
| 65 WebPrerender(const WebPrerender& other) { assign(other); } | 63 WebPrerender(const WebPrerender& other) { assign(other); } |
| 66 WebPrerender& operator=(const WebPrerender& other) | 64 WebPrerender& operator=(const WebPrerender& other) |
| 67 { | 65 { |
| 68 assign(other); | 66 assign(other); |
| 69 return *this; | 67 return *this; |
| 70 } | 68 } |
| 71 | 69 |
| 72 #if INSIDE_BLINK | 70 #if INSIDE_BLINK |
| 73 BLINK_PLATFORM_EXPORT explicit WebPrerender(PassRefPtr<blink::Prerender>); | 71 BLINK_PLATFORM_EXPORT explicit WebPrerender(PassRefPtr<Prerender>); |
| 74 | 72 |
| 75 BLINK_PLATFORM_EXPORT const blink::Prerender* toPrerender() const; | 73 BLINK_PLATFORM_EXPORT const Prerender* toPrerender() const; |
| 76 #endif | 74 #endif |
| 77 | 75 |
| 78 BLINK_PLATFORM_EXPORT void reset(); | 76 BLINK_PLATFORM_EXPORT void reset(); |
| 79 BLINK_PLATFORM_EXPORT void assign(const WebPrerender&); | 77 BLINK_PLATFORM_EXPORT void assign(const WebPrerender&); |
| 80 BLINK_PLATFORM_EXPORT bool isNull() const; | 78 BLINK_PLATFORM_EXPORT bool isNull() const; |
| 81 | 79 |
| 82 BLINK_PLATFORM_EXPORT WebURL url() const; | 80 BLINK_PLATFORM_EXPORT WebURL url() const; |
| 83 BLINK_PLATFORM_EXPORT WebString referrer() const; | 81 BLINK_PLATFORM_EXPORT WebString referrer() const; |
| 84 BLINK_PLATFORM_EXPORT unsigned relTypes() const; | 82 BLINK_PLATFORM_EXPORT unsigned relTypes() const; |
| 85 BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const; | 83 BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const; |
| 86 | 84 |
| 87 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 85 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
| 88 BLINK_PLATFORM_EXPORT const ExtraData* extraData() const; | 86 BLINK_PLATFORM_EXPORT const ExtraData* extraData() const; |
| 89 | 87 |
| 90 BLINK_PLATFORM_EXPORT void didStartPrerender(); | 88 BLINK_PLATFORM_EXPORT void didStartPrerender(); |
| 91 BLINK_PLATFORM_EXPORT void didStopPrerender(); | 89 BLINK_PLATFORM_EXPORT void didStopPrerender(); |
| 92 BLINK_PLATFORM_EXPORT void didSendLoadForPrerender(); | 90 BLINK_PLATFORM_EXPORT void didSendLoadForPrerender(); |
| 93 BLINK_PLATFORM_EXPORT void didSendDOMContentLoadedForPrerender(); | 91 BLINK_PLATFORM_EXPORT void didSendDOMContentLoadedForPrerender(); |
| 94 | 92 |
| 95 private: | 93 private: |
| 96 WebPrivatePtr<blink::Prerender> m_private; | 94 WebPrivatePtr<Prerender> m_private; |
| 97 }; | 95 }; |
| 98 | 96 |
| 99 } // namespace blink | 97 } // namespace blink |
| 100 | 98 |
| 101 #endif // WebPrerender_h | 99 #endif // WebPrerender_h |
| OLD | NEW |