Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class SingleThreadTaskRunner; | 19 class SingleThreadTaskRunner; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace v8 { | |
| 23 class Context; | |
| 24 class Function; | |
|
dcheng
2017/06/06 19:57:17
I think we only need v8::Local and Context for now
Łukasz Anforowicz
2017/06/07 20:35:07
Done (here and also in WebFrame.h which would othe
| |
| 25 class Value; | |
| 26 template <class T> | |
| 27 class Local; | |
| 28 } | |
| 29 | |
| 22 namespace blink { | 30 namespace blink { |
| 23 | 31 |
| 24 class InterfaceProvider; | 32 class InterfaceProvider; |
| 25 class InterfaceRegistry; | 33 class InterfaceRegistry; |
| 26 class WebAutofillClient; | 34 class WebAutofillClient; |
| 27 class WebContentSettingsClient; | 35 class WebContentSettingsClient; |
| 28 class WebDevToolsAgent; | 36 class WebDevToolsAgent; |
| 29 class WebDevToolsAgentClient; | 37 class WebDevToolsAgentClient; |
| 30 class WebDoubleSize; | 38 class WebDoubleSize; |
| 31 class WebFrameClient; | 39 class WebFrameClient; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 263 // Returns the value for a page property that is only defined when printing. | 271 // Returns the value for a page property that is only defined when printing. |
| 264 // printBegin must have been called before this method. | 272 // printBegin must have been called before this method. |
| 265 virtual WebString PageProperty(const WebString& property_name, | 273 virtual WebString PageProperty(const WebString& property_name, |
| 266 int page_index) = 0; | 274 int page_index) = 0; |
| 267 | 275 |
| 268 // Scripting -------------------------------------------------------------- | 276 // Scripting -------------------------------------------------------------- |
| 269 | 277 |
| 270 // Executes script in the context of the current page. | 278 // Executes script in the context of the current page. |
| 271 virtual void ExecuteScript(const WebScriptSource&) = 0; | 279 virtual void ExecuteScript(const WebScriptSource&) = 0; |
| 272 | 280 |
| 281 // Returns the V8 context for associated with the main world and this | |
| 282 // frame. There can be many V8 contexts associated with this frame, one for | |
| 283 // each isolated world and one for the main world. If you don't know what | |
| 284 // the "main world" or an "isolated world" is, then you probably shouldn't | |
| 285 // be calling this API. | |
| 286 virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0; | |
| 287 | |
| 273 // Executes script in the context of the current page and returns the value | 288 // Executes script in the context of the current page and returns the value |
| 274 // that the script evaluated to with callback. Script execution can be | 289 // that the script evaluated to with callback. Script execution can be |
| 275 // suspend. | 290 // suspend. |
| 276 // DEPRECATED: Prefer requestExecuteScriptInIsolatedWorld(). | 291 // DEPRECATED: Prefer requestExecuteScriptInIsolatedWorld(). |
| 277 virtual void RequestExecuteScriptAndReturnValue( | 292 virtual void RequestExecuteScriptAndReturnValue( |
| 278 const WebScriptSource&, | 293 const WebScriptSource&, |
| 279 bool user_gesture, | 294 bool user_gesture, |
| 280 WebScriptExecutionCallback*) = 0; | 295 WebScriptExecutionCallback*) = 0; |
| 281 | 296 |
| 282 // Requests execution of the given function, but allowing for script | 297 // Requests execution of the given function, but allowing for script |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 589 // to call these on a WebLocalFrame. | 604 // to call these on a WebLocalFrame. |
| 590 bool IsWebLocalFrame() const override = 0; | 605 bool IsWebLocalFrame() const override = 0; |
| 591 WebLocalFrame* ToWebLocalFrame() override = 0; | 606 WebLocalFrame* ToWebLocalFrame() override = 0; |
| 592 bool IsWebRemoteFrame() const override = 0; | 607 bool IsWebRemoteFrame() const override = 0; |
| 593 WebRemoteFrame* ToWebRemoteFrame() override = 0; | 608 WebRemoteFrame* ToWebRemoteFrame() override = 0; |
| 594 }; | 609 }; |
| 595 | 610 |
| 596 } // namespace blink | 611 } // namespace blink |
| 597 | 612 |
| 598 #endif // WebLocalFrame_h | 613 #endif // WebLocalFrame_h |
| OLD | NEW |