| 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" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 int& margin_right, | 259 int& margin_right, |
| 260 int& margin_bottom, | 260 int& margin_bottom, |
| 261 int& margin_left) = 0; | 261 int& margin_left) = 0; |
| 262 | 262 |
| 263 // Returns the value for a page property that is only defined when printing. | 263 // Returns the value for a page property that is only defined when printing. |
| 264 // printBegin must have been called before this method. | 264 // printBegin must have been called before this method. |
| 265 virtual WebString PageProperty(const WebString& property_name, | 265 virtual WebString PageProperty(const WebString& property_name, |
| 266 int page_index) = 0; | 266 int page_index) = 0; |
| 267 | 267 |
| 268 // Scripting -------------------------------------------------------------- | 268 // Scripting -------------------------------------------------------------- |
| 269 |
| 270 // Executes script in the context of the current page. |
| 271 virtual void ExecuteScript(const WebScriptSource&) = 0; |
| 272 |
| 269 // Executes script in the context of the current page and returns the value | 273 // Executes script in the context of the current page and returns the value |
| 270 // that the script evaluated to with callback. Script execution can be | 274 // that the script evaluated to with callback. Script execution can be |
| 271 // suspend. | 275 // suspend. |
| 272 // DEPRECATED: Prefer requestExecuteScriptInIsolatedWorld(). | 276 // DEPRECATED: Prefer requestExecuteScriptInIsolatedWorld(). |
| 273 virtual void RequestExecuteScriptAndReturnValue( | 277 virtual void RequestExecuteScriptAndReturnValue( |
| 274 const WebScriptSource&, | 278 const WebScriptSource&, |
| 275 bool user_gesture, | 279 bool user_gesture, |
| 276 WebScriptExecutionCallback*) = 0; | 280 WebScriptExecutionCallback*) = 0; |
| 277 | 281 |
| 278 // Requests execution of the given function, but allowing for script | 282 // Requests execution of the given function, but allowing for script |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 // Returns frame-specific task runner to run tasks of this type on. | 565 // Returns frame-specific task runner to run tasks of this type on. |
| 562 // They have the same lifetime as the frame. | 566 // They have the same lifetime as the frame. |
| 563 virtual base::SingleThreadTaskRunner* TimerTaskRunner() = 0; | 567 virtual base::SingleThreadTaskRunner* TimerTaskRunner() = 0; |
| 564 virtual base::SingleThreadTaskRunner* LoadingTaskRunner() = 0; | 568 virtual base::SingleThreadTaskRunner* LoadingTaskRunner() = 0; |
| 565 virtual base::SingleThreadTaskRunner* UnthrottledTaskRunner() = 0; | 569 virtual base::SingleThreadTaskRunner* UnthrottledTaskRunner() = 0; |
| 566 | 570 |
| 567 // Returns the WebInputMethodController associated with this local frame. | 571 // Returns the WebInputMethodController associated with this local frame. |
| 568 virtual WebInputMethodController* GetInputMethodController() = 0; | 572 virtual WebInputMethodController* GetInputMethodController() = 0; |
| 569 | 573 |
| 570 // Loading ------------------------------------------------------------------ | 574 // Loading ------------------------------------------------------------------ |
| 575 |
| 571 // Creates and returns a loader. This function can be called only when this | 576 // Creates and returns a loader. This function can be called only when this |
| 572 // frame is attached to a document. | 577 // frame is attached to a document. |
| 573 virtual std::unique_ptr<WebURLLoader> CreateURLLoader() = 0; | 578 virtual std::unique_ptr<WebURLLoader> CreateURLLoader() = 0; |
| 574 | 579 |
| 575 // Geometry ----------------------------------------------------------------- | 580 // Geometry ----------------------------------------------------------------- |
| 576 | 581 |
| 577 // If set to false, do not draw scrollbars on this frame's view. | 582 // If set to false, do not draw scrollbars on this frame's view. |
| 578 virtual void SetCanHaveScrollbars(bool) = 0; | 583 virtual void SetCanHaveScrollbars(bool) = 0; |
| 579 | 584 |
| 580 protected: | 585 protected: |
| 581 explicit WebLocalFrame(WebTreeScopeType scope) : WebFrame(scope) {} | 586 explicit WebLocalFrame(WebTreeScopeType scope) : WebFrame(scope) {} |
| 582 | 587 |
| 583 // Inherited from WebFrame, but intentionally hidden: it never makes sense | 588 // Inherited from WebFrame, but intentionally hidden: it never makes sense |
| 584 // to call these on a WebLocalFrame. | 589 // to call these on a WebLocalFrame. |
| 585 bool IsWebLocalFrame() const override = 0; | 590 bool IsWebLocalFrame() const override = 0; |
| 586 WebLocalFrame* ToWebLocalFrame() override = 0; | 591 WebLocalFrame* ToWebLocalFrame() override = 0; |
| 587 bool IsWebRemoteFrame() const override = 0; | 592 bool IsWebRemoteFrame() const override = 0; |
| 588 WebRemoteFrame* ToWebRemoteFrame() override = 0; | 593 WebRemoteFrame* ToWebRemoteFrame() override = 0; |
| 589 }; | 594 }; |
| 590 | 595 |
| 591 } // namespace blink | 596 } // namespace blink |
| 592 | 597 |
| 593 #endif // WebLocalFrame_h | 598 #endif // WebLocalFrame_h |
| OLD | NEW |