| 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 void WebFrameImpl::BindToWindowObject(const std::wstring& name, | 786 void WebFrameImpl::BindToWindowObject(const std::wstring& name, |
| 787 NPObject* object) { | 787 NPObject* object) { |
| 788 assert(frame_); | 788 assert(frame_); |
| 789 if (!frame_ || !frame_->script()->isEnabled()) | 789 if (!frame_ || !frame_->script()->isEnabled()) |
| 790 return; | 790 return; |
| 791 | 791 |
| 792 // TODO(mbelshe): Move this to the ScriptController and make it JS neutral. | 792 // TODO(mbelshe): Move this to the ScriptController and make it JS neutral. |
| 793 | 793 |
| 794 String key = webkit_glue::StdWStringToString(name); | 794 String key = webkit_glue::StdWStringToString(name); |
| 795 #if USE(V8) | 795 #if USE(V8) |
| 796 frame_->script()->BindToWindowObject(frame_, key, object); | 796 frame_->script()->bindToWindowObject(frame_, key, object); |
| 797 #endif | 797 #endif |
| 798 | 798 |
| 799 #if USE(JSC) | 799 #if USE(JSC) |
| 800 JSC::JSGlobalObject* window = frame_->script()->globalObject(); | 800 JSC::JSGlobalObject* window = frame_->script()->globalObject(); |
| 801 JSC::ExecState* exec = window->globalExec(); | 801 JSC::ExecState* exec = window->globalExec(); |
| 802 JSC::Bindings::RootObject* root = frame_->script()->bindingRootObject(); | 802 JSC::Bindings::RootObject* root = frame_->script()->bindingRootObject(); |
| 803 ASSERT(exec); | 803 ASSERT(exec); |
| 804 JSC::RuntimeObjectImp* instance(JSC::Bindings::Instance::createRuntimeObject( | 804 JSC::RuntimeObjectImp* instance(JSC::Bindings::Instance::createRuntimeObject( |
| 805 exec, JSC::Bindings::CInstance::create(object, root))); | 805 exec, JSC::Bindings::CInstance::create(object, root))); |
| 806 JSC::Identifier id(exec, key.latin1().data()); | 806 JSC::Identifier id(exec, key.latin1().data()); |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1921 return password_listeners_.get(input_element); | 1921 return password_listeners_.get(input_element); |
| 1922 } | 1922 } |
| 1923 | 1923 |
| 1924 void WebFrameImpl::ClearPasswordListeners() { | 1924 void WebFrameImpl::ClearPasswordListeners() { |
| 1925 for (PasswordListenerMap::iterator iter = password_listeners_.begin(); | 1925 for (PasswordListenerMap::iterator iter = password_listeners_.begin(); |
| 1926 iter != password_listeners_.end(); ++iter) { | 1926 iter != password_listeners_.end(); ++iter) { |
| 1927 delete iter->second; | 1927 delete iter->second; |
| 1928 } | 1928 } |
| 1929 password_listeners_.clear(); | 1929 password_listeners_.clear(); |
| 1930 } | 1930 } |
| OLD | NEW |