OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "bindings/v8/Dictionary.h" | 36 #include "bindings/v8/Dictionary.h" |
37 #include "core/dom/ExceptionCode.h" | 37 #include "core/dom/ExceptionCode.h" |
38 #include "wtf/HashMap.h" | 38 #include "wtf/HashMap.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 PassRefPtr<MediaConstraintsImpl> MediaConstraintsImpl::create(const Dictionary&
constraints, ExceptionCode& ec) | 42 PassRefPtr<MediaConstraintsImpl> MediaConstraintsImpl::create(const Dictionary&
constraints, ExceptionCode& ec) |
43 { | 43 { |
44 RefPtr<MediaConstraintsImpl> object = adoptRef(new MediaConstraintsImpl()); | 44 RefPtr<MediaConstraintsImpl> object = adoptRef(new MediaConstraintsImpl()); |
45 if (!object->initialize(constraints)) { | 45 if (!object->initialize(constraints)) { |
46 ec = TYPE_MISMATCH_ERR; | 46 ec = TypeMismatchError; |
47 return 0; | 47 return 0; |
48 } | 48 } |
49 return object.release(); | 49 return object.release(); |
50 } | 50 } |
51 | 51 |
52 PassRefPtr<MediaConstraintsImpl> MediaConstraintsImpl::create() | 52 PassRefPtr<MediaConstraintsImpl> MediaConstraintsImpl::create() |
53 { | 53 { |
54 return adoptRef(new MediaConstraintsImpl()); | 54 return adoptRef(new MediaConstraintsImpl()); |
55 } | 55 } |
56 | 56 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 if (i->m_name == name) { | 148 if (i->m_name == name) { |
149 value = i->m_value; | 149 value = i->m_value; |
150 return true; | 150 return true; |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 return false; | 154 return false; |
155 } | 155 } |
156 | 156 |
157 } // namespace WebCore | 157 } // namespace WebCore |
OLD | NEW |