OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. 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 are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 v8::Local<v8::Object> WebPluginContainerImpl::v8ObjectForElement() | 429 v8::Local<v8::Object> WebPluginContainerImpl::v8ObjectForElement() |
430 { | 430 { |
431 LocalFrame* frame = m_element->document().frame(); | 431 LocalFrame* frame = m_element->document().frame(); |
432 if (!frame) | 432 if (!frame) |
433 return v8::Local<v8::Object>(); | 433 return v8::Local<v8::Object>(); |
434 | 434 |
435 if (!frame->script().canExecuteScripts(NotAboutToExecuteScript)) | 435 if (!frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
436 return v8::Local<v8::Object>(); | 436 return v8::Local<v8::Object>(); |
437 | 437 |
438 ScriptState* scriptState = ScriptState::forMainWorld(frame); | 438 ScriptState* scriptState = ScriptState::forMainWorld(frame); |
439 if (scriptState->contextIsValid()) | 439 if (!scriptState->contextIsValid()) |
440 return v8::Local<v8::Object>(); | 440 return v8::Local<v8::Object>(); |
441 | 441 |
442 v8::Handle<v8::Value> v8value = toV8(m_element, scriptState->context()->Glob
al(), scriptState->isolate()); | 442 v8::Handle<v8::Value> v8value = toV8(m_element, scriptState->context()->Glob
al(), scriptState->isolate()); |
443 ASSERT(v8value->IsObject()); | 443 ASSERT(v8value->IsObject()); |
444 | 444 |
445 return v8::Handle<v8::Object>::Cast(v8value); | 445 return v8::Handle<v8::Object>::Cast(v8value); |
446 } | 446 } |
447 | 447 |
448 WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, bool popup
sAllowed) | 448 WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, bool popup
sAllowed) |
449 { | 449 { |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 | 962 |
963 return clipRect; | 963 return clipRect; |
964 } | 964 } |
965 | 965 |
966 bool WebPluginContainerImpl::pluginShouldPersist() const | 966 bool WebPluginContainerImpl::pluginShouldPersist() const |
967 { | 967 { |
968 return m_webPlugin->shouldPersist(); | 968 return m_webPlugin->shouldPersist(); |
969 } | 969 } |
970 | 970 |
971 } // namespace blink | 971 } // namespace blink |
OLD | NEW |