| 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 "WebFrame.h" | 8 #include "WebFrame.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 enum class WebAppBannerPromptReply; | 12 enum class WebAppBannerPromptReply; |
| 13 enum class WebSandboxFlags; | 13 enum class WebSandboxFlags; |
| 14 enum class WebTreeScopeType; |
| 14 class WebAutofillClient; | 15 class WebAutofillClient; |
| 15 class WebContentSettingsClient; | 16 class WebContentSettingsClient; |
| 16 class WebDevToolsAgent; | 17 class WebDevToolsAgent; |
| 17 class WebDevToolsAgentClient; | 18 class WebDevToolsAgentClient; |
| 18 class WebFrameClient; | 19 class WebFrameClient; |
| 19 class WebNode; | 20 class WebNode; |
| 20 class WebScriptExecutionCallback; | 21 class WebScriptExecutionCallback; |
| 21 class WebSuspendableTask; | 22 class WebSuspendableTask; |
| 22 struct WebPrintPresetOptions; | 23 struct WebPrintPresetOptions; |
| 23 | 24 |
| 24 // Interface for interacting with in process frames. This contains methods that | 25 // Interface for interacting with in process frames. This contains methods that |
| 25 // require interacting with a frame's document. | 26 // require interacting with a frame's document. |
| 26 // FIXME: Move lots of methods from WebFrame in here. | 27 // FIXME: Move lots of methods from WebFrame in here. |
| 27 class WebLocalFrame : public WebFrame { | 28 class WebLocalFrame : public WebFrame { |
| 28 public: | 29 public: |
| 29 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). | 30 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). |
| 30 // It is valid to pass a null client pointer. | 31 // It is valid to pass a null client pointer. |
| 32 BLINK_EXPORT static WebLocalFrame* create(WebTreeScopeType, WebFrameClient*)
; |
| 33 // TODO(dcheng): Remove this deprecated overload. |
| 31 BLINK_EXPORT static WebLocalFrame* create(WebFrameClient*); | 34 BLINK_EXPORT static WebLocalFrame* create(WebFrameClient*); |
| 32 | 35 |
| 33 // Returns the WebFrame associated with the current V8 context. This | 36 // Returns the WebFrame associated with the current V8 context. This |
| 34 // function can return 0 if the context is associated with a Document that | 37 // function can return 0 if the context is associated with a Document that |
| 35 // is not currently being displayed in a Frame. | 38 // is not currently being displayed in a Frame. |
| 36 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext(); | 39 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext(); |
| 37 | 40 |
| 38 // Returns the frame corresponding to the given context. This can return 0 | 41 // Returns the frame corresponding to the given context. This can return 0 |
| 39 // if the context is detached from the frame, or if the context doesn't | 42 // if the context is detached from the frame, or if the context doesn't |
| 40 // correspond to a frame (e.g., workers). | 43 // correspond to a frame (e.g., workers). |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 virtual void willShowInstallBannerPrompt(int requestId, const WebVector<WebS
tring>& platforms, WebAppBannerPromptReply*) = 0; | 138 virtual void willShowInstallBannerPrompt(int requestId, const WebVector<WebS
tring>& platforms, WebAppBannerPromptReply*) = 0; |
| 136 | 139 |
| 137 // Old version of the above function missing |requestId|. | 140 // Old version of the above function missing |requestId|. |
| 138 // TODO(benwells): remove this once the above is rolled into chrome. | 141 // TODO(benwells): remove this once the above is rolled into chrome. |
| 139 virtual void willShowInstallBannerPrompt(const WebVector<WebString>& platfor
ms, WebAppBannerPromptReply*) = 0; | 142 virtual void willShowInstallBannerPrompt(const WebVector<WebString>& platfor
ms, WebAppBannerPromptReply*) = 0; |
| 140 | 143 |
| 141 // Image reload ----------------------------------------------------------- | 144 // Image reload ----------------------------------------------------------- |
| 142 | 145 |
| 143 // If the provided node is an image, reload the image bypassing the cache. | 146 // If the provided node is an image, reload the image bypassing the cache. |
| 144 virtual void reloadImage(const WebNode&) = 0; | 147 virtual void reloadImage(const WebNode&) = 0; |
| 148 |
| 149 protected: |
| 150 explicit WebLocalFrame(WebTreeScopeType scope) : WebFrame(scope) { } |
| 145 }; | 151 }; |
| 146 | 152 |
| 147 } // namespace blink | 153 } // namespace blink |
| 148 | 154 |
| 149 #endif // WebLocalFrame_h | 155 #endif // WebLocalFrame_h |
| 150 | 156 |
| OLD | NEW |