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

Side by Side Diff: Source/bindings/v8/Dictionary.cpp

Issue 17031006: Rename DOMWindow interface to Window (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 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/bindings/v8/DOMWrapperWorld.cpp ('k') | Source/bindings/v8/PageScriptDebugServer.cpp » ('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 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 10 matching lines...) Expand all
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "bindings/v8/Dictionary.h" 27 #include "bindings/v8/Dictionary.h"
28 28
29 #include "V8CSSFontFaceRule.h" 29 #include "V8CSSFontFaceRule.h"
30 #include "V8DOMError.h" 30 #include "V8DOMError.h"
31 #include "V8DOMWindow.h"
32 #include "V8EventTarget.h" 31 #include "V8EventTarget.h"
33 #include "V8IDBKeyRange.h" 32 #include "V8IDBKeyRange.h"
34 #include "V8MIDIPort.h" 33 #include "V8MIDIPort.h"
35 #include "V8MediaKeyError.h" 34 #include "V8MediaKeyError.h"
36 #include "V8SpeechRecognitionError.h" 35 #include "V8SpeechRecognitionError.h"
37 #include "V8SpeechRecognitionResult.h" 36 #include "V8SpeechRecognitionResult.h"
38 #include "V8SpeechRecognitionResultList.h" 37 #include "V8SpeechRecognitionResultList.h"
39 #include "V8Storage.h" 38 #include "V8Storage.h"
40 #include "V8Uint8Array.h" 39 #include "V8Uint8Array.h"
41 #include "V8VoidCallback.h" 40 #include "V8VoidCallback.h"
41 #include "V8Window.h"
42 #include "bindings/v8/ArrayValue.h" 42 #include "bindings/v8/ArrayValue.h"
43 #include "bindings/v8/V8Binding.h" 43 #include "bindings/v8/V8Binding.h"
44 #include "bindings/v8/V8Utilities.h" 44 #include "bindings/v8/V8Utilities.h"
45 #include "core/dom/DOMStringList.h" 45 #include "core/dom/DOMStringList.h"
46 #include "modules/indexeddb/IDBKeyRange.h" 46 #include "modules/indexeddb/IDBKeyRange.h"
47 #include "modules/speech/SpeechRecognitionError.h" 47 #include "modules/speech/SpeechRecognitionError.h"
48 #include "modules/speech/SpeechRecognitionResult.h" 48 #include "modules/speech/SpeechRecognitionResult.h"
49 #include "modules/speech/SpeechRecognitionResultList.h" 49 #include "modules/speech/SpeechRecognitionResultList.h"
50 #include "wtf/MathExtras.h" 50 #include "wtf/MathExtras.h"
51 51
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 { 243 {
244 v8::Local<v8::Value> v8Value; 244 v8::Local<v8::Value> v8Value;
245 if (!getKey(key, v8Value)) 245 if (!getKey(key, v8Value))
246 return false; 246 return false;
247 247
248 // We need to handle a DOMWindow specially, because a DOMWindow wrapper 248 // We need to handle a DOMWindow specially, because a DOMWindow wrapper
249 // exists on a prototype chain of v8Value. 249 // exists on a prototype chain of v8Value.
250 value = 0; 250 value = 0;
251 if (v8Value->IsObject()) { 251 if (v8Value->IsObject()) {
252 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); 252 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value);
253 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8 DOMWindow::GetTemplate(m_isolate, worldTypeInMainThread(m_isolate))); 253 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8 Window::GetTemplate(m_isolate, worldTypeInMainThread(m_isolate)));
254 if (!window.IsEmpty()) 254 if (!window.IsEmpty())
255 value = V8DOMWindow::toNative(window); 255 value = V8Window::toNative(window);
256 } 256 }
257 return true; 257 return true;
258 } 258 }
259 259
260 bool Dictionary::get(const String& key, RefPtr<Storage>& value) const 260 bool Dictionary::get(const String& key, RefPtr<Storage>& value) const
261 { 261 {
262 v8::Local<v8::Value> v8Value; 262 v8::Local<v8::Value> v8Value;
263 if (!getKey(key, v8Value)) 263 if (!getKey(key, v8Value))
264 return false; 264 return false;
265 265
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 { 423 {
424 v8::Local<v8::Value> v8Value; 424 v8::Local<v8::Value> v8Value;
425 if (!getKey(key, v8Value)) 425 if (!getKey(key, v8Value))
426 return false; 426 return false;
427 427
428 value = 0; 428 value = 0;
429 // We need to handle a DOMWindow specially, because a DOMWindow wrapper 429 // We need to handle a DOMWindow specially, because a DOMWindow wrapper
430 // exists on a prototype chain of v8Value. 430 // exists on a prototype chain of v8Value.
431 if (v8Value->IsObject()) { 431 if (v8Value->IsObject()) {
432 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); 432 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value);
433 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8 DOMWindow::GetTemplate(m_isolate, worldTypeInMainThread(m_isolate))); 433 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8 Window::GetTemplate(m_isolate, worldTypeInMainThread(m_isolate)));
434 if (!window.IsEmpty()) { 434 if (!window.IsEmpty()) {
435 value = toWrapperTypeInfo(window)->toEventTarget(window); 435 value = toWrapperTypeInfo(window)->toEventTarget(window);
436 return true; 436 return true;
437 } 437 }
438 } 438 }
439 439
440 if (V8DOMWrapper::isDOMWrapper(v8Value)) { 440 if (V8DOMWrapper::isDOMWrapper(v8Value)) {
441 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); 441 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value);
442 value = toWrapperTypeInfo(wrapper)->toEventTarget(wrapper); 442 value = toWrapperTypeInfo(wrapper)->toEventTarget(wrapper);
443 } 443 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 v8::Local<v8::String> key = properties->Get(i)->ToString(); 582 v8::Local<v8::String> key = properties->Get(i)->ToString();
583 if (!options->Has(key)) 583 if (!options->Has(key))
584 continue; 584 continue;
585 names.append(toWebCoreString(key)); 585 names.append(toWebCoreString(key));
586 } 586 }
587 587
588 return true; 588 return true;
589 } 589 }
590 590
591 } // namespace WebCore 591 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/DOMWrapperWorld.cpp ('k') | Source/bindings/v8/PageScriptDebugServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698