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

Side by Side Diff: Source/core/html/LinkResource.h

Issue 22573005: [HTML Imports] Implement "load" and "error" events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/LinkImport.cpp ('k') | Source/core/loader/cache/FetchRequest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/html/LinkImport.cpp ('k') | Source/core/loader/cache/FetchRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698