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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp

Issue 2595543003: Rename toV8(...) function in Blink to ToV8(...). (Closed)
Patch Set: Rebasing... Created 3 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
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 void WindowProxy::updateDocumentProperty() { 386 void WindowProxy::updateDocumentProperty() {
387 DCHECK(m_world->isMainWorld()); 387 DCHECK(m_world->isMainWorld());
388 388
389 if (m_frame->isRemoteFrame()) 389 if (m_frame->isRemoteFrame())
390 return; 390 return;
391 391
392 ScriptState::Scope scope(m_scriptState.get()); 392 ScriptState::Scope scope(m_scriptState.get());
393 v8::Local<v8::Context> context = m_scriptState->context(); 393 v8::Local<v8::Context> context = m_scriptState->context();
394 LocalFrame* frame = toLocalFrame(m_frame); 394 LocalFrame* frame = toLocalFrame(m_frame);
395 v8::Local<v8::Value> documentWrapper = 395 v8::Local<v8::Value> documentWrapper =
396 toV8(frame->document(), context->Global(), m_isolate); 396 ToV8(frame->document(), context->Global(), m_isolate);
397 DCHECK(documentWrapper->IsObject()); 397 DCHECK(documentWrapper->IsObject());
398 // Update the cached accessor for window.document. 398 // Update the cached accessor for window.document.
399 CHECK(V8PrivateProperty::getWindowDocumentCachedAccessor(m_isolate).set( 399 CHECK(V8PrivateProperty::getWindowDocumentCachedAccessor(m_isolate).set(
400 context, context->Global(), documentWrapper)); 400 context, context->Global(), documentWrapper));
401 } 401 }
402 402
403 void WindowProxy::updateActivityLogger() { 403 void WindowProxy::updateActivityLogger() {
404 m_scriptState->perContextData()->setActivityLogger( 404 m_scriptState->perContextData()->setActivityLogger(
405 V8DOMActivityLogger::activityLogger( 405 V8DOMActivityLogger::activityLogger(
406 m_world->worldId(), 406 m_world->worldId(),
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 if (items->isEmpty()) 480 if (items->isEmpty())
481 return v8Undefined(); 481 return v8Undefined();
482 482
483 if (items->hasExactlyOneItem()) { 483 if (items->hasExactlyOneItem()) {
484 HTMLElement* element = items->item(0); 484 HTMLElement* element = items->item(0);
485 ASSERT(element); 485 ASSERT(element);
486 Frame* frame = isHTMLIFrameElement(*element) 486 Frame* frame = isHTMLIFrameElement(*element)
487 ? toHTMLIFrameElement(*element).contentFrame() 487 ? toHTMLIFrameElement(*element).contentFrame()
488 : 0; 488 : 0;
489 if (frame) 489 if (frame)
490 return toV8(frame->domWindow(), creationContext, isolate); 490 return ToV8(frame->domWindow(), creationContext, isolate);
491 return toV8(element, creationContext, isolate); 491 return ToV8(element, creationContext, isolate);
492 } 492 }
493 return toV8(items, creationContext, isolate); 493 return ToV8(items, creationContext, isolate);
494 } 494 }
495 495
496 static void getter(v8::Local<v8::Name> property, 496 static void getter(v8::Local<v8::Name> property,
497 const v8::PropertyCallbackInfo<v8::Value>& info) { 497 const v8::PropertyCallbackInfo<v8::Value>& info) {
498 if (!property->IsString()) 498 if (!property->IsString())
499 return; 499 return;
500 // FIXME: Consider passing StringImpl directly. 500 // FIXME: Consider passing StringImpl directly.
501 AtomicString name = toCoreAtomicString(property.As<v8::String>()); 501 AtomicString name = toCoreAtomicString(property.As<v8::String>());
502 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder()); 502 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder());
503 ASSERT(htmlDocument); 503 ASSERT(htmlDocument);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 .ToChecked(); 550 .ToChecked();
551 } 551 }
552 552
553 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) { 553 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) {
554 if (!isContextInitialized()) 554 if (!isContextInitialized())
555 return; 555 return;
556 setSecurityToken(origin); 556 setSecurityToken(origin);
557 } 557 }
558 558
559 } // namespace blink 559 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698