OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 return; | 708 return; |
709 | 709 |
710 // TODO(mbelshe): Move this to the ScriptController and make it JS neutral. | 710 // TODO(mbelshe): Move this to the ScriptController and make it JS neutral. |
711 | 711 |
712 String key = webkit_glue::StdWStringToString(name); | 712 String key = webkit_glue::StdWStringToString(name); |
713 #if USE(V8) | 713 #if USE(V8) |
714 frame_->script()->BindToWindowObject(frame_.get(), key, object); | 714 frame_->script()->BindToWindowObject(frame_.get(), key, object); |
715 #endif | 715 #endif |
716 | 716 |
717 #if USE(JSC) | 717 #if USE(JSC) |
718 KJS::JSGlobalObject* window = frame_->script()->globalObject(); | 718 JSC::JSGlobalObject* window = frame_->script()->globalObject(); |
719 KJS::ExecState* exec = window->globalExec(); | 719 JSC::ExecState* exec = window->globalExec(); |
720 KJS::Bindings::RootObject* root = frame_->script()->bindingRootObject(); | 720 JSC::Bindings::RootObject* root = frame_->script()->bindingRootObject(); |
721 ASSERT(exec); | 721 ASSERT(exec); |
722 KJS::RuntimeObjectImp* instance = KJS::Bindings::Instance::createRuntimeObject
( | 722 JSC::RuntimeObjectImp* instance = JSC::Bindings::Instance::createRuntimeObject
( |
723 exec, KJS::Bindings::CInstance::create(object, root)); | 723 exec, JSC::Bindings::CInstance::create(object, root)); |
724 KJS::Identifier id(exec, key.latin1().data()); | 724 JSC::Identifier id(exec, key.latin1().data()); |
725 KJS::PutPropertySlot slot; | 725 JSC::PutPropertySlot slot; |
726 window->put(exec, id, instance, slot); | 726 window->put(exec, id, instance, slot); |
727 #endif | 727 #endif |
728 } | 728 } |
729 | 729 |
730 | 730 |
731 // Call JavaScript garbage collection. | 731 // Call JavaScript garbage collection. |
732 void WebFrameImpl::CallJSGC() { | 732 void WebFrameImpl::CallJSGC() { |
733 if (!frame_) | 733 if (!frame_) |
734 return; | 734 return; |
735 if (!frame_->settings()->isJavaScriptEnabled()) | 735 if (!frame_->settings()->isJavaScriptEnabled()) |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 if (loader) { | 1882 if (loader) { |
1883 return WebCore::FrameLoadTypeReloadAllowingStaleData == | 1883 return WebCore::FrameLoadTypeReloadAllowingStaleData == |
1884 loader->policyLoadType(); | 1884 loader->policyLoadType(); |
1885 } | 1885 } |
1886 return false; | 1886 return false; |
1887 } | 1887 } |
1888 | 1888 |
1889 int WebFrameImpl::PendingFrameUnloadEventCount() const { | 1889 int WebFrameImpl::PendingFrameUnloadEventCount() const { |
1890 return frame()->eventHandler()->pendingFrameUnloadEventCount(); | 1890 return frame()->eventHandler()->pendingFrameUnloadEventCount(); |
1891 } | 1891 } |
OLD | NEW |