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

Side by Side Diff: Source/core/fileapi/FileReader.h

Issue 132233004: Update remaining core classes to use OVERRIDE / FINAL when needed (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
« no previous file with comments | « Source/core/fileapi/File.h ('k') | Source/core/fileapi/FileReaderLoader.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 30 matching lines...) Expand all
41 #include "wtf/RefCounted.h" 41 #include "wtf/RefCounted.h"
42 #include "wtf/ThreadSpecific.h" 42 #include "wtf/ThreadSpecific.h"
43 #include "wtf/text/WTFString.h" 43 #include "wtf/text/WTFString.h"
44 44
45 namespace WebCore { 45 namespace WebCore {
46 46
47 class Blob; 47 class Blob;
48 class ExceptionState; 48 class ExceptionState;
49 class ExecutionContext; 49 class ExecutionContext;
50 50
51 class FileReader : public RefCounted<FileReader>, public ScriptWrappable, public ActiveDOMObject, public EventTargetWithInlineData, public FileReaderLoaderClien t { 51 class FileReader FINAL : public RefCounted<FileReader>, public ScriptWrappable, public ActiveDOMObject, public EventTargetWithInlineData, public FileReaderLoade rClient {
52 REFCOUNTED_EVENT_TARGET(FileReader); 52 REFCOUNTED_EVENT_TARGET(FileReader);
53 public: 53 public:
54 static PassRefPtr<FileReader> create(ExecutionContext*); 54 static PassRefPtr<FileReader> create(ExecutionContext*);
55 55
56 virtual ~FileReader(); 56 virtual ~FileReader();
57 57
58 enum ReadyState { 58 enum ReadyState {
59 EMPTY = 0, 59 EMPTY = 0,
60 LOADING = 1, 60 LOADING = 1,
61 DONE = 2 61 DONE = 2
62 }; 62 };
63 63
64 void readAsArrayBuffer(Blob*, ExceptionState&); 64 void readAsArrayBuffer(Blob*, ExceptionState&);
65 void readAsBinaryString(Blob*, ExceptionState&); 65 void readAsBinaryString(Blob*, ExceptionState&);
66 void readAsText(Blob*, const String& encoding, ExceptionState&); 66 void readAsText(Blob*, const String& encoding, ExceptionState&);
67 void readAsText(Blob*, ExceptionState&); 67 void readAsText(Blob*, ExceptionState&);
68 void readAsDataURL(Blob*, ExceptionState&); 68 void readAsDataURL(Blob*, ExceptionState&);
69 void abort(); 69 void abort();
70 70
71 void doAbort(); 71 void doAbort();
72 72
73 ReadyState readyState() const { return m_state; } 73 ReadyState readyState() const { return m_state; }
74 PassRefPtr<FileError> error() { return m_error; } 74 PassRefPtr<FileError> error() { return m_error; }
75 FileReaderLoader::ReadType readType() const { return m_readType; } 75 FileReaderLoader::ReadType readType() const { return m_readType; }
76 PassRefPtr<ArrayBuffer> arrayBufferResult() const; 76 PassRefPtr<ArrayBuffer> arrayBufferResult() const;
77 String stringResult(); 77 String stringResult();
78 78
79 // ActiveDOMObject 79 // ActiveDOMObject
80 virtual void stop(); 80 virtual void stop() OVERRIDE;
81 81
82 // EventTarget 82 // EventTarget
83 virtual const AtomicString& interfaceName() const OVERRIDE; 83 virtual const AtomicString& interfaceName() const OVERRIDE;
84 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); } 84 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); }
85 85
86 // FileReaderLoaderClient 86 // FileReaderLoaderClient
87 virtual void didStartLoading(); 87 virtual void didStartLoading() OVERRIDE;
88 virtual void didReceiveData(); 88 virtual void didReceiveData() OVERRIDE;
89 virtual void didFinishLoading(); 89 virtual void didFinishLoading() OVERRIDE;
90 virtual void didFail(FileError::ErrorCode); 90 virtual void didFail(FileError::ErrorCode) OVERRIDE;
91 91
92 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadstart); 92 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadstart);
93 DEFINE_ATTRIBUTE_EVENT_LISTENER(progress); 93 DEFINE_ATTRIBUTE_EVENT_LISTENER(progress);
94 DEFINE_ATTRIBUTE_EVENT_LISTENER(load); 94 DEFINE_ATTRIBUTE_EVENT_LISTENER(load);
95 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); 95 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort);
96 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 96 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
97 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadend); 97 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadend);
98 98
99 private: 99 private:
100 class ThrottlingController; 100 class ThrottlingController;
(...skipping 25 matching lines...) Expand all
126 String m_encoding; 126 String m_encoding;
127 127
128 OwnPtr<FileReaderLoader> m_loader; 128 OwnPtr<FileReaderLoader> m_loader;
129 RefPtr<FileError> m_error; 129 RefPtr<FileError> m_error;
130 double m_lastProgressNotificationTimeMS; 130 double m_lastProgressNotificationTimeMS;
131 }; 131 };
132 132
133 } // namespace WebCore 133 } // namespace WebCore
134 134
135 #endif // FileReader_h 135 #endif // FileReader_h
OLDNEW
« no previous file with comments | « Source/core/fileapi/File.h ('k') | Source/core/fileapi/FileReaderLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698