OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 return v8::Local<v8::Value>(); | 836 return v8::Local<v8::Value>(); |
837 return result; | 837 return result; |
838 } | 838 } |
839 | 839 |
840 v8::Local<v8::Context> WebLocalFrameImpl::MainWorldScriptContext() const { | 840 v8::Local<v8::Context> WebLocalFrameImpl::MainWorldScriptContext() const { |
841 ScriptState* script_state = ToScriptStateForMainWorld(GetFrame()); | 841 ScriptState* script_state = ToScriptStateForMainWorld(GetFrame()); |
842 DCHECK(script_state); | 842 DCHECK(script_state); |
843 return script_state->GetContext(); | 843 return script_state->GetContext(); |
844 } | 844 } |
845 | 845 |
| 846 v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const { |
| 847 return MainWorldScriptContext()->Global(); |
| 848 } |
| 849 |
846 bool WebFrame::ScriptCanAccess(WebFrame* target) { | 850 bool WebFrame::ScriptCanAccess(WebFrame* target) { |
847 return BindingSecurity::ShouldAllowAccessToFrame( | 851 return BindingSecurity::ShouldAllowAccessToFrame( |
848 CurrentDOMWindow(MainThreadIsolate()), ToCoreFrame(*target), | 852 CurrentDOMWindow(MainThreadIsolate()), ToCoreFrame(*target), |
849 BindingSecurity::ErrorReportOption::kDoNotReport); | 853 BindingSecurity::ErrorReportOption::kDoNotReport); |
850 } | 854 } |
851 | 855 |
852 void WebLocalFrameImpl::Reload(WebFrameLoadType load_type) { | 856 void WebLocalFrameImpl::Reload(WebFrameLoadType load_type) { |
853 // TODO(clamy): Remove this function once RenderFrame calls load for all | 857 // TODO(clamy): Remove this function once RenderFrame calls load for all |
854 // requests. | 858 // requests. |
855 ReloadWithOverrideURL(KURL(), load_type); | 859 ReloadWithOverrideURL(KURL(), load_type); |
(...skipping 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2607 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { | 2611 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { |
2608 return *text_checker_client_; | 2612 return *text_checker_client_; |
2609 } | 2613 } |
2610 | 2614 |
2611 void WebLocalFrameImpl::SetTextCheckClient( | 2615 void WebLocalFrameImpl::SetTextCheckClient( |
2612 WebTextCheckClient* text_check_client) { | 2616 WebTextCheckClient* text_check_client) { |
2613 text_check_client_ = text_check_client; | 2617 text_check_client_ = text_check_client; |
2614 } | 2618 } |
2615 | 2619 |
2616 } // namespace blink | 2620 } // namespace blink |
OLD | NEW |