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

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

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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/V8DOMWrapper.h ('k') | Source/bindings/v8/WorkerScriptController.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) 2008, 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // -- has prototype --> Window.prototype 322 // -- has prototype --> Window.prototype
323 // -- has prototype --> Object.prototype 323 // -- has prototype --> Object.prototype
324 // 324 //
325 // Note: Much of this prototype structure is hidden from web content. The 325 // Note: Much of this prototype structure is hidden from web content. The
326 // outer, inner, and DOMWindow instance all appear to be the same 326 // outer, inner, and DOMWindow instance all appear to be the same
327 // JavaScript object. 327 // JavaScript object.
328 // 328 //
329 v8::Handle<v8::Object> innerGlobalObject = toInnerGlobalObject(m_context.new Local(m_isolate)); 329 v8::Handle<v8::Object> innerGlobalObject = toInnerGlobalObject(m_context.new Local(m_isolate));
330 V8DOMWrapper::setNativeInfo(innerGlobalObject, &V8Window::info, window); 330 V8DOMWrapper::setNativeInfo(innerGlobalObject, &V8Window::info, window);
331 innerGlobalObject->SetPrototype(windowWrapper); 331 innerGlobalObject->SetPrototype(windowWrapper);
332 V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<DOMWindow>(window), &V8W indow::info, windowWrapper, m_isolate, WrapperConfiguration::Dependent); 332 V8DOMWrapper::associateObjectWithWrapper<V8Window>(PassRefPtr<DOMWindow>(win dow), &V8Window::info, windowWrapper, m_isolate, WrapperConfiguration::Dependent );
333 DOMWrapperWorld::setInitializingWindow(false); 333 DOMWrapperWorld::setInitializingWindow(false);
334 return true; 334 return true;
335 } 335 }
336 336
337 void V8WindowShell::updateDocumentWrapper(v8::Handle<v8::Object> wrapper) 337 void V8WindowShell::updateDocumentWrapper(v8::Handle<v8::Object> wrapper)
338 { 338 {
339 ASSERT(m_world->isMainWorld()); 339 ASSERT(m_world->isMainWorld());
340 m_document.set(m_isolate, wrapper); 340 m_document.set(m_isolate, wrapper);
341 } 341 }
342 342
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 void V8WindowShell::updateSecurityOrigin() 503 void V8WindowShell::updateSecurityOrigin()
504 { 504 {
505 ASSERT(m_world->isMainWorld()); 505 ASSERT(m_world->isMainWorld());
506 if (m_context.isEmpty()) 506 if (m_context.isEmpty())
507 return; 507 return;
508 v8::HandleScope handleScope; 508 v8::HandleScope handleScope;
509 setSecurityToken(); 509 setSecurityToken();
510 } 510 }
511 511
512 } // WebCore 512 } // WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8DOMWrapper.h ('k') | Source/bindings/v8/WorkerScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698