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

Side by Side Diff: Source/modules/encoding/TextDecoder.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 61
62 TextDecoder::TextDecoder(const WTF::TextEncoding& encoding, bool fatal, bool ign oreBOM) 62 TextDecoder::TextDecoder(const WTF::TextEncoding& encoding, bool fatal, bool ign oreBOM)
63 : m_encoding(encoding) 63 : m_encoding(encoding)
64 , m_codec(newTextCodec(encoding)) 64 , m_codec(newTextCodec(encoding))
65 , m_fatal(fatal) 65 , m_fatal(fatal)
66 , m_ignoreBOM(ignoreBOM) 66 , m_ignoreBOM(ignoreBOM)
67 , m_bomSeen(false) 67 , m_bomSeen(false)
68 { 68 {
69 ScriptWrappable::init(this);
70 } 69 }
71 70
72 TextDecoder::~TextDecoder() 71 TextDecoder::~TextDecoder()
73 { 72 {
74 } 73 }
75 74
76 String TextDecoder::encoding() const 75 String TextDecoder::encoding() const
77 { 76 {
78 String name = String(m_encoding.name()).lower(); 77 String name = String(m_encoding.name()).lower();
79 // Where possible, encoding aliases should be handled by changes to Chromium 's ICU or Blink's WTF. 78 // Where possible, encoding aliases should be handled by changes to Chromium 's ICU or Blink's WTF.
(...skipping 28 matching lines...) Expand all
108 s.remove(0); 107 s.remove(0);
109 } 108 }
110 109
111 if (flush) 110 if (flush)
112 m_bomSeen = false; 111 m_bomSeen = false;
113 112
114 return s; 113 return s;
115 } 114 }
116 115
117 } // namespace blink 116 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/device_orientation/DeviceRotationRate.cpp ('k') | Source/modules/encoding/TextEncoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698