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

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

Issue 2620313002: Refactor WindowProxy into Local and Remote subclasses. (Closed)
Patch Set: Cleanup comments Created 3 years, 11 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 IntRect; 16 class IntRect;
17 class LocalFrame; 17 class LocalFrame;
18 class RemoteFrameClient; 18 class RemoteFrameClient;
19 class RemoteFrameView; 19 class RemoteFrameView;
20 class RemoteWindowProxyManager;
20 class WebLayer; 21 class WebLayer;
21 class WindowProxyManager;
22 struct FrameLoadRequest; 22 struct FrameLoadRequest;
23 23
24 class CORE_EXPORT RemoteFrame final : public Frame { 24 class CORE_EXPORT RemoteFrame final : public Frame {
25 public: 25 public:
26 static RemoteFrame* create(RemoteFrameClient*, FrameHost*, FrameOwner*); 26 static RemoteFrame* create(RemoteFrameClient*, FrameHost*, FrameOwner*);
27 27
28 ~RemoteFrame() override; 28 ~RemoteFrame() override;
29 29
30 // Frame overrides: 30 // Frame overrides:
31 DECLARE_VIRTUAL_TRACE(); 31 DECLARE_VIRTUAL_TRACE();
(...skipping 29 matching lines...) Expand all
61 void createView(); 61 void createView();
62 62
63 RemoteFrameView* view() const; 63 RemoteFrameView* view() const;
64 64
65 RemoteFrameClient* client() const; 65 RemoteFrameClient* client() const;
66 66
67 private: 67 private:
68 RemoteFrame(RemoteFrameClient*, FrameHost*, FrameOwner*); 68 RemoteFrame(RemoteFrameClient*, FrameHost*, FrameOwner*);
69 69
70 // Internal Frame helper overrides: 70 // Internal Frame helper overrides:
71 WindowProxyManager* getWindowProxyManager() const override { 71 WindowProxyManagerBase* getWindowProxyManager() const override;
Yuki 2017/01/11 10:09:24 nit: Why not RemoteWindowProxyManager?
dcheng 2017/01/11 10:35:29 Ditto.
72 return m_windowProxyManager.get(); 72
73 }
74 // Intentionally private to prevent redundant checks when the type is 73 // Intentionally private to prevent redundant checks when the type is
75 // already RemoteFrame. 74 // already RemoteFrame.
76 bool isLocalFrame() const override { return false; } 75 bool isLocalFrame() const override { return false; }
77 bool isRemoteFrame() const override { return true; } 76 bool isRemoteFrame() const override { return true; }
78 77
79 void detachChildren(); 78 void detachChildren();
80 79
81 Member<RemoteFrameView> m_view; 80 Member<RemoteFrameView> m_view;
82 Member<RemoteSecurityContext> m_securityContext; 81 Member<RemoteSecurityContext> m_securityContext;
83 Member<WindowProxyManager> m_windowProxyManager; 82 Member<RemoteWindowProxyManager> m_windowProxyManager;
84 WebLayer* m_webLayer = nullptr; 83 WebLayer* m_webLayer = nullptr;
85 }; 84 };
86 85
87 inline RemoteFrameView* RemoteFrame::view() const { 86 inline RemoteFrameView* RemoteFrame::view() const {
88 return m_view.get(); 87 return m_view.get();
89 } 88 }
90 89
91 DEFINE_TYPE_CASTS(RemoteFrame, 90 DEFINE_TYPE_CASTS(RemoteFrame,
92 Frame, 91 Frame,
93 remoteFrame, 92 remoteFrame,
94 remoteFrame->isRemoteFrame(), 93 remoteFrame->isRemoteFrame(),
95 remoteFrame.isRemoteFrame()); 94 remoteFrame.isRemoteFrame());
96 95
97 } // namespace blink 96 } // namespace blink
98 97
99 #endif // RemoteFrame_h 98 #endif // RemoteFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698