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 #include "WebFrameLoadType.h" | 9 #include "WebFrameLoadType.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 enum class WebAppBannerPromptReply; | 13 enum class WebAppBannerPromptReply; |
14 enum class WebSandboxFlags; | 14 enum class WebSandboxFlags; |
15 enum class WebTreeScopeType; | 15 enum class WebTreeScopeType; |
16 class ServiceRegistry; | |
16 class WebAutofillClient; | 17 class WebAutofillClient; |
17 class WebContentSettingsClient; | 18 class WebContentSettingsClient; |
18 class WebDevToolsAgent; | 19 class WebDevToolsAgent; |
19 class WebDevToolsAgentClient; | 20 class WebDevToolsAgentClient; |
20 class WebFrameClient; | 21 class WebFrameClient; |
21 class WebNode; | 22 class WebNode; |
22 class WebScriptExecutionCallback; | 23 class WebScriptExecutionCallback; |
23 class WebSuspendableTask; | 24 class WebSuspendableTask; |
24 class WebTestInterfaceFactory; | 25 class WebTestInterfaceFactory; |
25 struct WebPrintPresetOptions; | 26 struct WebPrintPresetOptions; |
26 | 27 |
27 // Interface for interacting with in process frames. This contains methods that | 28 // Interface for interacting with in process frames. This contains methods that |
28 // require interacting with a frame's document. | 29 // require interacting with a frame's document. |
29 // FIXME: Move lots of methods from WebFrame in here. | 30 // FIXME: Move lots of methods from WebFrame in here. |
30 class WebLocalFrame : public WebFrame { | 31 class WebLocalFrame : public WebFrame { |
31 public: | 32 public: |
32 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). | 33 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). |
33 // It is valid to pass a null client pointer. | 34 // It is valid to pass a null client pointer. |
34 BLINK_EXPORT static WebLocalFrame* create(WebTreeScopeType, WebFrameClient*, WebFrame* opener = nullptr); | 35 BLINK_EXPORT static WebLocalFrame* create(WebTreeScopeType, WebFrameClient*, WebFrame* opener = nullptr, ServiceRegistry* = nullptr); |
dcheng
2016/03/29 04:51:56
Hmm. Would it make more sense to have a WebFrameCl
esprehn
2016/03/29 05:26:20
In general I want WebFrameClient to die, it's a go
Sam McNally
2016/03/30 00:20:53
Done.
| |
35 | 36 |
36 // Used to create a provisional local frame in prepration for replacing a | 37 // Used to create a provisional local frame in prepration for replacing a |
37 // remote frame if the load commits. The returned frame is only partially | 38 // remote frame if the load commits. The returned frame is only partially |
38 // attached to the frame tree: it has the same parent as its potential | 39 // attached to the frame tree: it has the same parent as its potential |
39 // replacee but is invisible to the rest of the frames in the frame tree. | 40 // replacee but is invisible to the rest of the frames in the frame tree. |
40 // If the load commits, call swap() to fully attach this frame. | 41 // If the load commits, call swap() to fully attach this frame. |
41 BLINK_EXPORT static WebLocalFrame* createProvisional(WebFrameClient*, WebRem oteFrame*, WebSandboxFlags, const WebFrameOwnerProperties&); | 42 BLINK_EXPORT static WebLocalFrame* createProvisional(WebFrameClient*, WebRem oteFrame*, WebSandboxFlags, const WebFrameOwnerProperties&, ServiceRegistry* = n ullptr); |
42 | 43 |
43 // Returns the WebFrame associated with the current V8 context. This | 44 // Returns the WebFrame associated with the current V8 context. This |
44 // function can return 0 if the context is associated with a Document that | 45 // function can return 0 if the context is associated with a Document that |
45 // is not currently being displayed in a Frame. | 46 // is not currently being displayed in a Frame. |
46 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext(); | 47 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext(); |
47 | 48 |
48 // Returns the frame corresponding to the given context. This can return 0 | 49 // Returns the frame corresponding to the given context. This can return 0 |
49 // if the context is detached from the frame, or if the context doesn't | 50 // if the context is detached from the frame, or if the context doesn't |
50 // correspond to a frame (e.g., workers). | 51 // correspond to a frame (e.g., workers). |
51 BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Local<v8::Context>); | 52 BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Local<v8::Context>); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
331 // to call these on a WebLocalFrame. | 332 // to call these on a WebLocalFrame. |
332 bool isWebLocalFrame() const override = 0; | 333 bool isWebLocalFrame() const override = 0; |
333 WebLocalFrame* toWebLocalFrame() override = 0; | 334 WebLocalFrame* toWebLocalFrame() override = 0; |
334 bool isWebRemoteFrame() const override = 0; | 335 bool isWebRemoteFrame() const override = 0; |
335 WebRemoteFrame* toWebRemoteFrame() override = 0; | 336 WebRemoteFrame* toWebRemoteFrame() override = 0; |
336 }; | 337 }; |
337 | 338 |
338 } // namespace blink | 339 } // namespace blink |
339 | 340 |
340 #endif // WebLocalFrame_h | 341 #endif // WebLocalFrame_h |
OLD | NEW |