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

Side by Side Diff: Source/core/fetch/RawResource.h

Issue 114123005: Show media and VTT text tracks in the devtools. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated broken test Created 7 years 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 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const ResourceResponse m_redirectResponse; 70 const ResourceResponse m_redirectResponse;
71 }; 71 };
72 72
73 Vector<RedirectPair> m_redirectChain; 73 Vector<RedirectPair> m_redirectChain;
74 }; 74 };
75 75
76 #ifdef SECURITY_ASSERT_ENABLED 76 #ifdef SECURITY_ASSERT_ENABLED
77 inline bool isRawResource(const Resource& resource) 77 inline bool isRawResource(const Resource& resource)
78 { 78 {
79 Resource::Type type = resource.type(); 79 Resource::Type type = resource.type();
80 return type == Resource::MainResource || type == Resource::Raw || type == Re source::TextTrack || type == Resource::ImportResource; 80 return type == Resource::MainResource || type == Resource::Raw || type == Re source::TextTrack || type == Resource::Media || type == Resource::ImportResource ;
81 } 81 }
82 #endif 82 #endif
83 inline RawResource* toRawResource(const ResourcePtr<Resource>& resource) 83 inline RawResource* toRawResource(const ResourcePtr<Resource>& resource)
84 { 84 {
85 ASSERT_WITH_SECURITY_IMPLICATION(!resource || isRawResource(*resource.get()) ); 85 ASSERT_WITH_SECURITY_IMPLICATION(!resource || isRawResource(*resource.get()) );
86 return static_cast<RawResource*>(resource.get()); 86 return static_cast<RawResource*>(resource.get());
87 } 87 }
88 88
89 class RawResourceClient : public ResourceClient { 89 class RawResourceClient : public ResourceClient {
90 public: 90 public:
91 virtual ~RawResourceClient() { } 91 virtual ~RawResourceClient() { }
92 static ResourceClientType expectedType() { return RawResourceType; } 92 static ResourceClientType expectedType() { return RawResourceType; }
93 virtual ResourceClientType resourceClientType() const { return expectedType( ); } 93 virtual ResourceClientType resourceClientType() const { return expectedType( ); }
94 94
95 virtual void dataSent(Resource*, unsigned long long /* bytesSent */, unsigne d long long /* totalBytesToBeSent */) { } 95 virtual void dataSent(Resource*, unsigned long long /* bytesSent */, unsigne d long long /* totalBytesToBeSent */) { }
96 virtual void responseReceived(Resource*, const ResourceResponse&) { } 96 virtual void responseReceived(Resource*, const ResourceResponse&) { }
97 virtual void dataReceived(Resource*, const char* /* data */, int /* length * /) { } 97 virtual void dataReceived(Resource*, const char* /* data */, int /* length * /) { }
98 virtual void redirectReceived(Resource*, ResourceRequest&, const ResourceRes ponse&) { } 98 virtual void redirectReceived(Resource*, ResourceRequest&, const ResourceRes ponse&) { }
99 virtual void dataDownloaded(Resource*, int) { } 99 virtual void dataDownloaded(Resource*, int) { }
100 }; 100 };
101 101
102 } 102 }
103 103
104 #endif // RawResource_h 104 #endif // RawResource_h
OLDNEW
« no previous file with comments | « LayoutTests/inspector/network-toggle-type-filter-expected.txt ('k') | Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698