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

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

Issue 1738553002: [ABANDONED] Move multipart/x-mixed-replace related code to ImageResource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multipart-cleanup-2
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "wtf/Vector.h" 47 #include "wtf/Vector.h"
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 : public GarbageCollectedFinalize d<MultipartImageResourceParser> { 52 class CORE_EXPORT MultipartImageResourceParser : public GarbageCollectedFinalize d<MultipartImageResourceParser> {
53 public: 53 public:
54 class CORE_EXPORT Client : public WillBeGarbageCollectedMixin { 54 class CORE_EXPORT Client : public WillBeGarbageCollectedMixin {
55 public: 55 public:
56 virtual ~Client() {} 56 virtual ~Client() {}
57 virtual void onePartInMultipartReceived(const ResourceResponse&) = 0; 57 virtual void onePartInMultipartReceived(const ResourceResponse&, bool is FirstPart) = 0;
58 virtual void multipartDataReceived(const char* bytes, size_t) = 0; 58 virtual void multipartDataReceived(const char* bytes, size_t) = 0;
59 DEFINE_INLINE_VIRTUAL_TRACE() {} 59 DEFINE_INLINE_VIRTUAL_TRACE() {}
60 }; 60 };
61 61
62 MultipartImageResourceParser(const ResourceResponse&, const Vector<char>& bo undary, Client*); 62 MultipartImageResourceParser(const ResourceResponse&, const Vector<char>& bo undary, Client*);
63 void appendData(const char* bytes, size_t); 63 void appendData(const char* bytes, size_t);
64 void finish(); 64 void finish();
65 void cancel() { m_isCancelled = true; } 65 void cancel() { m_isCancelled = true; }
66 66
67 DECLARE_TRACE(); 67 DECLARE_TRACE();
(...skipping 16 matching lines...) Expand all
84 bool m_isParsingTop = true; 84 bool m_isParsingTop = true;
85 bool m_isParsingHeaders = false; 85 bool m_isParsingHeaders = false;
86 bool m_sawLastBoundary = false; 86 bool m_sawLastBoundary = false;
87 bool m_isFirstPart = true; 87 bool m_isFirstPart = true;
88 bool m_isCancelled = false; 88 bool m_isCancelled = false;
89 }; 89 };
90 90
91 } // namespace blink 91 } // namespace blink
92 92
93 #endif // MultipartImageResourceParser_h 93 #endif // MultipartImageResourceParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698