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

Side by Side Diff: third_party/WebKit/Source/core/frame/RemoteFrame.h

Issue 2762423003: Made Frame constructors (and subclasses) take Page& instead of Page* (Closed)
Patch Set: Rebase Created 3 years, 9 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 RemoteFrame_h 5 #ifndef RemoteFrame_h
6 #define RemoteFrame_h 6 #define RemoteFrame_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/RemoteSecurityContext.h" 9 #include "core/dom/RemoteSecurityContext.h"
10 #include "core/frame/Frame.h" 10 #include "core/frame/Frame.h"
11 #include "public/platform/WebFocusType.h" 11 #include "public/platform/WebFocusType.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class Event; 15 class Event;
16 class LocalFrame; 16 class LocalFrame;
17 class RemoteFrameClient; 17 class RemoteFrameClient;
18 class RemoteFrameView; 18 class RemoteFrameView;
19 class WebLayer; 19 class WebLayer;
20 struct FrameLoadRequest; 20 struct FrameLoadRequest;
21 21
22 class CORE_EXPORT RemoteFrame final : public Frame { 22 class CORE_EXPORT RemoteFrame final : public Frame {
23 public: 23 public:
24 static RemoteFrame* create(RemoteFrameClient*, Page*, FrameOwner*); 24 static RemoteFrame* create(RemoteFrameClient*, Page&, FrameOwner*);
25 25
26 ~RemoteFrame() override; 26 ~RemoteFrame() override;
27 27
28 // Frame overrides: 28 // Frame overrides:
29 DECLARE_VIRTUAL_TRACE(); 29 DECLARE_VIRTUAL_TRACE();
30 void navigate(Document& originDocument, 30 void navigate(Document& originDocument,
31 const KURL&, 31 const KURL&,
32 bool replaceCurrentItem, 32 bool replaceCurrentItem,
33 UserGestureStatus) override; 33 UserGestureStatus) override;
34 void navigate(const FrameLoadRequest& passedRequest) override; 34 void navigate(const FrameLoadRequest& passedRequest) override;
(...skipping 15 matching lines...) Expand all
50 void advanceFocus(WebFocusType, LocalFrame* source); 50 void advanceFocus(WebFocusType, LocalFrame* source);
51 51
52 void setView(RemoteFrameView*); 52 void setView(RemoteFrameView*);
53 void createView(); 53 void createView();
54 54
55 RemoteFrameView* view() const; 55 RemoteFrameView* view() const;
56 56
57 RemoteFrameClient* client() const; 57 RemoteFrameClient* client() const;
58 58
59 private: 59 private:
60 RemoteFrame(RemoteFrameClient*, Page*, FrameOwner*); 60 RemoteFrame(RemoteFrameClient*, Page&, FrameOwner*);
61 61
62 // Intentionally private to prevent redundant checks when the type is 62 // Intentionally private to prevent redundant checks when the type is
63 // already RemoteFrame. 63 // already RemoteFrame.
64 bool isLocalFrame() const override { return false; } 64 bool isLocalFrame() const override { return false; }
65 bool isRemoteFrame() const override { return true; } 65 bool isRemoteFrame() const override { return true; }
66 66
67 void detachChildren(); 67 void detachChildren();
68 68
69 Member<RemoteFrameView> m_view; 69 Member<RemoteFrameView> m_view;
70 Member<RemoteSecurityContext> m_securityContext; 70 Member<RemoteSecurityContext> m_securityContext;
71 WebLayer* m_webLayer = nullptr; 71 WebLayer* m_webLayer = nullptr;
72 }; 72 };
73 73
74 inline RemoteFrameView* RemoteFrame::view() const { 74 inline RemoteFrameView* RemoteFrame::view() const {
75 return m_view.get(); 75 return m_view.get();
76 } 76 }
77 77
78 DEFINE_TYPE_CASTS(RemoteFrame, 78 DEFINE_TYPE_CASTS(RemoteFrame,
79 Frame, 79 Frame,
80 remoteFrame, 80 remoteFrame,
81 remoteFrame->isRemoteFrame(), 81 remoteFrame->isRemoteFrame(),
82 remoteFrame.isRemoteFrame()); 82 remoteFrame.isRemoteFrame());
83 83
84 } // namespace blink 84 } // namespace blink
85 85
86 #endif // RemoteFrame_h 86 #endif // RemoteFrame_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/frame/RemoteFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698