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

Side by Side Diff: Source/core/loader/SubstituteData.h

Issue 120513004: Don't expose DocumentWriter to embedding layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 14 matching lines...) Expand all
25 25
26 #ifndef SubstituteData_h 26 #ifndef SubstituteData_h
27 #define SubstituteData_h 27 #define SubstituteData_h
28 28
29 #include "platform/SharedBuffer.h" 29 #include "platform/SharedBuffer.h"
30 #include "platform/weborigin/KURL.h" 30 #include "platform/weborigin/KURL.h"
31 #include "wtf/PassRefPtr.h" 31 #include "wtf/PassRefPtr.h"
32 #include "wtf/RefPtr.h" 32 #include "wtf/RefPtr.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 enum SubstituteDataLoadPolicy {
abarth-chromium 2014/01/06 22:29:31 We usually have a blank line above these sorts of
36 LoadNormally,
37 ForceSynchronousLoad
38 };
35 39
36 class SubstituteData { 40 class SubstituteData {
37 public: 41 public:
38 SubstituteData() { } 42 SubstituteData()
43 : m_substituteDataLoadPolicy(LoadNormally)
44 {
45 }
39 46
40 SubstituteData(PassRefPtr<SharedBuffer> content, const AtomicString& mim eType, const AtomicString& textEncoding, const KURL& failingURL) 47 SubstituteData(PassRefPtr<SharedBuffer> content, const AtomicString& mimeTyp e, const AtomicString& textEncoding, const KURL& failingURL, SubstituteDataLoadP olicy substituteDataLoadPolicy = LoadNormally)
41 : m_content(content) 48 : m_content(content)
42 , m_mimeType(mimeType) 49 , m_mimeType(mimeType)
43 , m_textEncoding(textEncoding) 50 , m_textEncoding(textEncoding)
44 , m_failingURL(failingURL) 51 , m_failingURL(failingURL)
45 { 52 , m_substituteDataLoadPolicy(substituteDataLoadPolicy)
46 } 53 {
54 }
47 55
48 bool isValid() const { return m_content != 0; } 56 bool isValid() const { return m_content; }
49 57
50 SharedBuffer* content() const { return m_content.get(); } 58 SharedBuffer* content() const { return m_content.get(); }
51 const AtomicString& mimeType() const { return m_mimeType; } 59 const AtomicString& mimeType() const { return m_mimeType; }
52 const AtomicString& textEncoding() const { return m_textEncoding; } 60 const AtomicString& textEncoding() const { return m_textEncoding; }
53 const KURL& failingURL() const { return m_failingURL; } 61 const KURL& failingURL() const { return m_failingURL; }
62 bool forceSynchronousLoad() const { return m_substituteDataLoadPolicy == For ceSynchronousLoad; }
abarth-chromium 2014/01/06 22:29:31 This sounds a bit like a verb... I think it's ok
54 63
55 private: 64 private:
56 RefPtr<SharedBuffer> m_content; 65 RefPtr<SharedBuffer> m_content;
57 AtomicString m_mimeType; 66 AtomicString m_mimeType;
58 AtomicString m_textEncoding; 67 AtomicString m_textEncoding;
59 KURL m_failingURL; 68 KURL m_failingURL;
60 }; 69 SubstituteDataLoadPolicy m_substituteDataLoadPolicy;
70 };
61 71
62 } 72 }
63 73
64 #endif // SubstituteData_h 74 #endif // SubstituteData_h
65 75
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698