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

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

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: Restore earlier approach + UpdateDistribution() Created 3 years, 6 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 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999-2001 Lars Knoll <knoll@kde.org> 3 * 1999-2001 Lars Knoll <knoll@kde.org>
4 * 1999-2001 Antti Koivisto <koivisto@kde.org> 4 * 1999-2001 Antti Koivisto <koivisto@kde.org>
5 * 2000-2001 Simon Hausmann <hausmann@kde.org> 5 * 2000-2001 Simon Hausmann <hausmann@kde.org>
6 * 2000-2001 Dirk Mueller <mueller@kde.org> 6 * 2000-2001 Dirk Mueller <mueller@kde.org>
7 * 2000 Stefan Schimanski <1Stein@gmx.de> 7 * 2000 Stefan Schimanski <1Stein@gmx.de>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
9 * reserved. 9 * reserved.
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 FrameClient* Client() const; 92 FrameClient* Client() const;
93 93
94 Page* GetPage() const; // Null when the frame is detached. 94 Page* GetPage() const; // Null when the frame is detached.
95 virtual FrameView* View() const = 0; 95 virtual FrameView* View() const = 0;
96 96
97 bool IsMainFrame() const; 97 bool IsMainFrame() const;
98 bool IsLocalRoot() const; 98 bool IsLocalRoot() const;
99 99
100 FrameOwner* Owner() const; 100 FrameOwner* Owner() const;
101 void SetOwner(FrameOwner* owner) { owner_ = owner; } 101 void SetOwner(FrameOwner*);
102 HTMLFrameOwnerElement* DeprecatedLocalOwner() const; 102 HTMLFrameOwnerElement* DeprecatedLocalOwner() const;
103 103
104 DOMWindow* DomWindow() const { return dom_window_; } 104 DOMWindow* DomWindow() const { return dom_window_; }
105 105
106 FrameTree& Tree() const; 106 FrameTree& Tree() const;
107 ChromeClient& GetChromeClient() const; 107 ChromeClient& GetChromeClient() const;
108 108
109 virtual SecurityContext* GetSecurityContext() const = 0; 109 virtual SecurityContext* GetSecurityContext() const = 0;
110 110
111 Frame* FindUnsafeParentScrollPropagationBoundary(); 111 Frame* FindUnsafeParentScrollPropagationBoundary();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool HasReceivedUserGesture() const { return has_received_user_gesture_; } 147 bool HasReceivedUserGesture() const { return has_received_user_gesture_; }
148 148
149 bool IsAttached() const { 149 bool IsAttached() const {
150 return lifecycle_.GetState() == FrameLifecycle::kAttached; 150 return lifecycle_.GetState() == FrameLifecycle::kAttached;
151 } 151 }
152 152
153 // Tests whether the feature-policy controlled feature is enabled by policy in 153 // Tests whether the feature-policy controlled feature is enabled by policy in
154 // the given frame. 154 // the given frame.
155 bool IsFeatureEnabled(WebFeaturePolicyFeature) const; 155 bool IsFeatureEnabled(WebFeaturePolicyFeature) const;
156 156
157 // Called to make a frame inert or non-inert. A frame is inert when there
158 // is a modal dialog displayed within an ancestor frame, and this frame
159 // itself is not within the dialog.
160 virtual void SetIsInert(bool) = 0;
161 void UpdateInertIfPossible();
162
157 protected: 163 protected:
158 Frame(FrameClient*, Page&, FrameOwner*, WindowProxyManager*); 164 Frame(FrameClient*, Page&, FrameOwner*, WindowProxyManager*);
159 165
160 mutable FrameTree tree_node_; 166 mutable FrameTree tree_node_;
161 167
162 Member<Page> page_; 168 Member<Page> page_;
163 Member<FrameOwner> owner_; 169 Member<FrameOwner> owner_;
164 Member<DOMWindow> dom_window_; 170 Member<DOMWindow> dom_window_;
165 171
166 bool has_received_user_gesture_ = false; 172 bool has_received_user_gesture_ = false;
(...skipping 19 matching lines...) Expand all
186 return tree_node_; 192 return tree_node_;
187 } 193 }
188 194
189 // Allow equality comparisons of Frames by reference or pointer, 195 // Allow equality comparisons of Frames by reference or pointer,
190 // interchangeably. 196 // interchangeably.
191 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame) 197 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Frame)
192 198
193 } // namespace blink 199 } // namespace blink
194 200
195 #endif // Frame_h 201 #endif // Frame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698