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

Side by Side Diff: third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.h

Issue 1710733002: Move multipart resource handling to core/fetch (2/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multipart-cleanup
Patch Set: Created 4 years, 9 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /* ***** BEGIN LICENSE BLOCK ***** 5 /* ***** BEGIN LICENSE BLOCK *****
6 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 6 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 * 7 *
8 * The contents of this file are subject to the Mozilla Public License Version 8 * The contents of this file are subject to the Mozilla Public License Version
9 * 1.1 (the "License"); you may not use this file except in compliance with 9 * 1.1 (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at 10 * the License. You may obtain a copy of the License at
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 namespace blink { 49 namespace blink {
50 50
51 // A parser parsing mlutipart/x-mixed-replace resource. 51 // A parser parsing mlutipart/x-mixed-replace resource.
52 class CORE_EXPORT MultipartImageResourceParser final : public GarbageCollectedFi nalized<MultipartImageResourceParser> { 52 class CORE_EXPORT MultipartImageResourceParser final : public GarbageCollectedFi nalized<MultipartImageResourceParser> {
53 WTF_MAKE_NONCOPYABLE(MultipartImageResourceParser); 53 WTF_MAKE_NONCOPYABLE(MultipartImageResourceParser);
54 public: 54 public:
55 class CORE_EXPORT Client : public WillBeGarbageCollectedMixin { 55 class CORE_EXPORT Client : public WillBeGarbageCollectedMixin {
56 public: 56 public:
57 virtual ~Client() = default; 57 virtual ~Client() = default;
58 virtual void onePartInMultipartReceived(const ResourceResponse&) = 0; 58 virtual void onePartInMultipartReceived(const ResourceResponse&, bool is FirstPart) = 0;
59 virtual void multipartDataReceived(const char* bytes, size_t) = 0; 59 virtual void multipartDataReceived(const char* bytes, size_t) = 0;
60 DEFINE_INLINE_VIRTUAL_TRACE() {} 60 DEFINE_INLINE_VIRTUAL_TRACE() {}
61 }; 61 };
62 62
63 MultipartImageResourceParser(const ResourceResponse&, const Vector<char>& bo undary, Client*); 63 MultipartImageResourceParser(const ResourceResponse&, const Vector<char>& bo undary, Client*);
64 void appendData(const char* bytes, size_t); 64 void appendData(const char* bytes, size_t);
65 void finish(); 65 void finish();
66 void cancel() { m_isCancelled = true; } 66 void cancel() { m_isCancelled = true; }
67 67
68 DECLARE_TRACE(); 68 DECLARE_TRACE();
(...skipping 16 matching lines...) Expand all
85 bool m_isParsingTop = true; 85 bool m_isParsingTop = true;
86 bool m_isParsingHeaders = false; 86 bool m_isParsingHeaders = false;
87 bool m_sawLastBoundary = false; 87 bool m_sawLastBoundary = false;
88 bool m_isFirstPart = true; 88 bool m_isFirstPart = true;
89 bool m_isCancelled = false; 89 bool m_isCancelled = false;
90 }; 90 };
91 91
92 } // namespace blink 92 } // namespace blink
93 93
94 #endif // MultipartImageResourceParser_h 94 #endif // MultipartImageResourceParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698