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

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

Issue 2651583007: Plumbing blink::Interface{Provider|Registry} through WebLocalFrame's constructor. (Closed)
Patch Set: Rebasing... Created 3 years, 10 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 "WebCompositionUnderline.h" 8 #include "WebCompositionUnderline.h"
9 #include "WebFrame.h" 9 #include "WebFrame.h"
10 #include "WebFrameLoadType.h" 10 #include "WebFrameLoadType.h"
11 #include "WebHistoryItem.h" 11 #include "WebHistoryItem.h"
12 #include "public/platform/WebCachePolicy.h" 12 #include "public/platform/WebCachePolicy.h"
13 #include "public/platform/WebURLError.h" 13 #include "public/platform/WebURLError.h"
14 #include "public/platform/site_engagement.mojom-shared.h" 14 #include "public/platform/site_engagement.mojom-shared.h"
15 15
16 namespace base { 16 namespace base {
17 class SingleThreadTaskRunner; 17 class SingleThreadTaskRunner;
18 } 18 }
19 19
20 namespace blink { 20 namespace blink {
21 21
22 class InterfaceProvider;
23 class InterfaceRegistry;
22 class WebAutofillClient; 24 class WebAutofillClient;
23 class WebContentSettingsClient; 25 class WebContentSettingsClient;
24 class WebDevToolsAgent; 26 class WebDevToolsAgent;
25 class WebDevToolsAgentClient; 27 class WebDevToolsAgentClient;
26 class WebDoubleSize; 28 class WebDoubleSize;
27 class WebFrameClient; 29 class WebFrameClient;
28 class WebFrameWidget; 30 class WebFrameWidget;
29 class WebInputMethodController; 31 class WebInputMethodController;
30 class WebRange; 32 class WebRange;
31 class WebScriptExecutionCallback; 33 class WebScriptExecutionCallback;
32 enum class WebCachePolicy; 34 enum class WebCachePolicy;
33 enum class WebSandboxFlags; 35 enum class WebSandboxFlags;
34 enum class WebTreeScopeType; 36 enum class WebTreeScopeType;
35 struct WebConsoleMessage; 37 struct WebConsoleMessage;
36 struct WebFindOptions; 38 struct WebFindOptions;
37 struct WebFloatRect; 39 struct WebFloatRect;
38 struct WebPrintPresetOptions; 40 struct WebPrintPresetOptions;
39 41
40 // Interface for interacting with in process frames. This contains methods that 42 // Interface for interacting with in process frames. This contains methods that
41 // require interacting with a frame's document. 43 // require interacting with a frame's document.
42 // FIXME: Move lots of methods from WebFrame in here. 44 // FIXME: Move lots of methods from WebFrame in here.
43 class WebLocalFrame : public WebFrame { 45 class WebLocalFrame : public WebFrame {
44 public: 46 public:
45 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). 47 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close().
46 // WebFrameClient may not be null. 48 // WebFrameClient may not be null.
47 BLINK_EXPORT static WebLocalFrame* create(WebTreeScopeType, 49 BLINK_EXPORT static WebLocalFrame* create(WebTreeScopeType,
48 WebFrameClient*, 50 WebFrameClient*,
51 blink::InterfaceProvider*,
52 blink::InterfaceRegistry*,
49 WebFrame* opener = nullptr); 53 WebFrame* opener = nullptr);
50 54
51 // Used to create a provisional local frame. Currently, it's possible for a 55 // Used to create a provisional local frame. Currently, it's possible for a
52 // provisional navigation not to commit (i.e. it might turn into a download), 56 // provisional navigation not to commit (i.e. it might turn into a download),
53 // but this can only be determined by actually trying to load it. The loading 57 // but this can only be determined by actually trying to load it. The loading
54 // process depends on having a corresponding LocalFrame in Blink to hold all 58 // process depends on having a corresponding LocalFrame in Blink to hold all
55 // the pending state. 59 // the pending state.
56 // 60 //
57 // When a provisional frame is first created, it is only partially attached to 61 // When a provisional frame is first created, it is only partially attached to
58 // the frame tree. This means that though a provisional frame might have a 62 // the frame tree. This means that though a provisional frame might have a
59 // frame owner, the frame owner's content frame does not point back at the 63 // frame owner, the frame owner's content frame does not point back at the
60 // provisional frame. Similarly, though a provisional frame may have a parent 64 // provisional frame. Similarly, though a provisional frame may have a parent
61 // frame pointer, the parent frame's children list will not contain the 65 // frame pointer, the parent frame's children list will not contain the
62 // provisional frame. Thus, a provisional frame is invisible to the rest of 66 // provisional frame. Thus, a provisional frame is invisible to the rest of
63 // Blink unless the navigation commits and the provisional frame is fully 67 // Blink unless the navigation commits and the provisional frame is fully
64 // attached to the frame tree by calling swap(). 68 // attached to the frame tree by calling swap().
65 // 69 //
66 // Otherwise, if the load should not commit, call detach() to discard the 70 // Otherwise, if the load should not commit, call detach() to discard the
67 // frame. 71 // frame.
68 BLINK_EXPORT static WebLocalFrame* createProvisional(WebFrameClient*, 72 BLINK_EXPORT static WebLocalFrame* createProvisional(
69 WebRemoteFrame*, 73 WebFrameClient*,
70 WebSandboxFlags); 74 blink::InterfaceProvider*,
75 blink::InterfaceRegistry*,
76 WebRemoteFrame*,
77 WebSandboxFlags);
71 78
72 // Returns the WebFrame associated with the current V8 context. This 79 // Returns the WebFrame associated with the current V8 context. This
73 // function can return 0 if the context is associated with a Document that 80 // function can return 0 if the context is associated with a Document that
74 // is not currently being displayed in a Frame. 81 // is not currently being displayed in a Frame.
75 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext(); 82 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext();
76 83
77 // Returns the frame corresponding to the given context. This can return 0 84 // Returns the frame corresponding to the given context. This can return 0
78 // if the context is detached from the frame, or if the context doesn't 85 // if the context is detached from the frame, or if the context doesn't
79 // correspond to a frame (e.g., workers). 86 // correspond to a frame (e.g., workers).
80 BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Local<v8::Context>); 87 BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Local<v8::Context>);
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 // to call these on a WebLocalFrame. 488 // to call these on a WebLocalFrame.
482 bool isWebLocalFrame() const override = 0; 489 bool isWebLocalFrame() const override = 0;
483 WebLocalFrame* toWebLocalFrame() override = 0; 490 WebLocalFrame* toWebLocalFrame() override = 0;
484 bool isWebRemoteFrame() const override = 0; 491 bool isWebRemoteFrame() const override = 0;
485 WebRemoteFrame* toWebRemoteFrame() override = 0; 492 WebRemoteFrame* toWebRemoteFrame() override = 0;
486 }; 493 };
487 494
488 } // namespace blink 495 } // namespace blink
489 496
490 #endif // WebLocalFrame_h 497 #endif // WebLocalFrame_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebFrameClient.h ('k') | third_party/WebKit/public/web/WebRemoteFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698