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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2923053002: Move MainWorldScriptContext accessor/method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 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) 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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698