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

Side by Side Diff: third_party/WebKit/public/web/WebLocalFrame.h

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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebLocalFrame_h 5 #ifndef WebLocalFrame_h
6 #define WebLocalFrame_h 6 #define WebLocalFrame_h
7 7
8 #include <set> 8 #include <set>
9 #include "WebCompositionUnderline.h" 9 #include "WebCompositionUnderline.h"
10 #include "WebFrame.h" 10 #include "WebFrame.h"
11 #include "WebFrameLoadType.h" 11 #include "WebFrameLoadType.h"
12 #include "WebHistoryItem.h" 12 #include "WebHistoryItem.h"
13 #include "public/platform/WebCachePolicy.h" 13 #include "public/platform/WebCachePolicy.h"
14 #include "public/platform/WebURLError.h" 14 #include "public/platform/WebURLError.h"
15 #include "public/platform/WebURLRequest.h" 15 #include "public/platform/WebURLRequest.h"
16 #include "public/platform/site_engagement.mojom-shared.h" 16 #include "public/platform/site_engagement.mojom-shared.h"
17 #include "v8/include/v8.h"
17 18
18 namespace base { 19 namespace base {
19 class SingleThreadTaskRunner; 20 class SingleThreadTaskRunner;
20 } 21 }
21 22
22 namespace blink { 23 namespace blink {
23 24
24 class InterfaceProvider; 25 class InterfaceProvider;
25 class InterfaceRegistry; 26 class InterfaceRegistry;
26 class WebAutofillClient; 27 class WebAutofillClient;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // Returns the value for a page property that is only defined when printing. 290 // Returns the value for a page property that is only defined when printing.
290 // printBegin must have been called before this method. 291 // printBegin must have been called before this method.
291 virtual WebString PageProperty(const WebString& property_name, 292 virtual WebString PageProperty(const WebString& property_name,
292 int page_index) = 0; 293 int page_index) = 0;
293 294
294 // Scripting -------------------------------------------------------------- 295 // Scripting --------------------------------------------------------------
295 296
296 // Executes script in the context of the current page. 297 // Executes script in the context of the current page.
297 virtual void ExecuteScript(const WebScriptSource&) = 0; 298 virtual void ExecuteScript(const WebScriptSource&) = 0;
298 299
300 // Returns the V8 context for associated with the main world and this
301 // frame. There can be many V8 contexts associated with this frame, one for
302 // each isolated world and one for the main world. If you don't know what
303 // the "main world" or an "isolated world" is, then you probably shouldn't
304 // be calling this API.
305 virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
306
299 // Executes script in the context of the current page and returns the value 307 // Executes script in the context of the current page and returns the value
300 // that the script evaluated to with callback. Script execution can be 308 // that the script evaluated to with callback. Script execution can be
301 // suspend. 309 // suspend.
302 // DEPRECATED: Prefer requestExecuteScriptInIsolatedWorld(). 310 // DEPRECATED: Prefer requestExecuteScriptInIsolatedWorld().
303 virtual void RequestExecuteScriptAndReturnValue( 311 virtual void RequestExecuteScriptAndReturnValue(
304 const WebScriptSource&, 312 const WebScriptSource&,
305 bool user_gesture, 313 bool user_gesture,
306 WebScriptExecutionCallback*) = 0; 314 WebScriptExecutionCallback*) = 0;
307 315
308 // Requests execution of the given function, but allowing for script 316 // Requests execution of the given function, but allowing for script
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 // to call these on a WebLocalFrame. 641 // to call these on a WebLocalFrame.
634 bool IsWebLocalFrame() const override = 0; 642 bool IsWebLocalFrame() const override = 0;
635 WebLocalFrame* ToWebLocalFrame() override = 0; 643 WebLocalFrame* ToWebLocalFrame() override = 0;
636 bool IsWebRemoteFrame() const override = 0; 644 bool IsWebRemoteFrame() const override = 0;
637 WebRemoteFrame* ToWebRemoteFrame() override = 0; 645 WebRemoteFrame* ToWebRemoteFrame() override = 0;
638 }; 646 };
639 647
640 } // namespace blink 648 } // namespace blink
641 649
642 #endif // WebLocalFrame_h 650 #endif // WebLocalFrame_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebFrame.h ('k') | third_party/WebKit/public/web/WebRemoteFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698