OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 Style, | 46 Style, |
47 Import | 47 Import |
48 }; | 48 }; |
49 | 49 |
50 explicit LinkResource(HTMLLinkElement*); | 50 explicit LinkResource(HTMLLinkElement*); |
51 virtual ~LinkResource(); | 51 virtual ~LinkResource(); |
52 | 52 |
53 virtual Type type() const = 0; | 53 virtual Type type() const = 0; |
54 virtual void process() = 0; | 54 virtual void process() = 0; |
55 virtual void ownerRemoved() = 0; | 55 virtual void ownerRemoved() = 0; |
| 56 virtual bool hasLoaded() const = 0; |
56 | 57 |
57 protected: | 58 protected: |
58 HTMLLinkElement* m_owner; | 59 HTMLLinkElement* m_owner; |
59 }; | 60 }; |
60 | 61 |
61 class LinkRequestBuilder { | 62 class LinkRequestBuilder { |
62 public: | 63 public: |
63 explicit LinkRequestBuilder(HTMLLinkElement* owner); | 64 explicit LinkRequestBuilder(HTMLLinkElement* owner); |
64 | 65 |
65 bool isValid() const { return !m_url.isEmpty() && m_url.isValid(); } | 66 bool isValid() const { return !m_url.isEmpty() && m_url.isValid(); } |
66 const KURL& url() const { return m_url; } | 67 const KURL& url() const { return m_url; } |
67 const String& charset() const { return m_charset; } | 68 const String& charset() const { return m_charset; } |
68 FetchRequest build(bool blocking) const; | 69 FetchRequest build(bool blocking) const; |
69 | 70 |
70 private: | 71 private: |
71 HTMLLinkElement* m_owner; | 72 HTMLLinkElement* m_owner; |
72 KURL m_url; | 73 KURL m_url; |
73 String m_charset; | 74 String m_charset; |
74 }; | 75 }; |
75 | 76 |
76 } // namespace WebCore | 77 } // namespace WebCore |
77 | 78 |
78 #endif // LinkResource_h | 79 #endif // LinkResource_h |
OLD | NEW |