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

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

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: nit addressed Created 3 years, 5 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 UserGestureStatus) override; 115 UserGestureStatus) override;
116 void Navigate(const FrameLoadRequest&) override; 116 void Navigate(const FrameLoadRequest&) override;
117 void Reload(FrameLoadType, ClientRedirectPolicy) override; 117 void Reload(FrameLoadType, ClientRedirectPolicy) override;
118 void Detach(FrameDetachType) override; 118 void Detach(FrameDetachType) override;
119 bool ShouldClose() override; 119 bool ShouldClose() override;
120 SecurityContext* GetSecurityContext() const override; 120 SecurityContext* GetSecurityContext() const override;
121 void PrintNavigationErrorMessage(const Frame&, const char* reason) override; 121 void PrintNavigationErrorMessage(const Frame&, const char* reason) override;
122 void PrintNavigationWarning(const String&) override; 122 void PrintNavigationWarning(const String&) override;
123 bool PrepareForCommit() override; 123 bool PrepareForCommit() override;
124 void DidChangeVisibilityState() override; 124 void DidChangeVisibilityState() override;
125 // This sets the is_inert_ flag and also recurses through this frame's
126 // subtree, updating the inert bit on all descendant frames.
127 void SetIsInert(bool) override;
125 128
126 void DetachChildren(); 129 void DetachChildren();
127 void DocumentAttached(); 130 void DocumentAttached();
128 131
129 Frame* FindFrameForNavigation(const AtomicString& name, 132 Frame* FindFrameForNavigation(const AtomicString& name,
130 LocalFrame& active_frame); 133 LocalFrame& active_frame);
131 134
132 // Note: these two functions are not virtual but intentionally shadow the 135 // Note: these two functions are not virtual but intentionally shadow the
133 // corresponding method in the Frame base class to return the 136 // corresponding method in the Frame base class to return the
134 // LocalFrame-specific subclass. 137 // LocalFrame-specific subclass.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 243
241 PerformanceMonitor* GetPerformanceMonitor() { return performance_monitor_; } 244 PerformanceMonitor* GetPerformanceMonitor() { return performance_monitor_; }
242 245
243 // Convenience function to allow loading image placeholders for the request if 246 // Convenience function to allow loading image placeholders for the request if
244 // either the flag in Settings() for using image placeholders is set, or if 247 // either the flag in Settings() for using image placeholders is set, or if
245 // the embedder decides that Client Lo-Fi should be used for this request. 248 // the embedder decides that Client Lo-Fi should be used for this request.
246 void MaybeAllowImagePlaceholder(FetchParameters&) const; 249 void MaybeAllowImagePlaceholder(FetchParameters&) const;
247 250
248 std::unique_ptr<WebURLLoader> CreateURLLoader(); 251 std::unique_ptr<WebURLLoader> CreateURLLoader();
249 252
253 bool IsInert() const { return is_inert_; }
254
250 using FrameInitCallback = void (*)(LocalFrame*); 255 using FrameInitCallback = void (*)(LocalFrame*);
251 // Allows for the registration of a callback that is invoked whenever a new 256 // Allows for the registration of a callback that is invoked whenever a new
252 // LocalFrame is initialized. Callbacks are executed in the order that they 257 // LocalFrame is initialized. Callbacks are executed in the order that they
253 // were added using registerInitializationCallback, and there are no checks 258 // were added using registerInitializationCallback, and there are no checks
254 // for adding a callback multiple times. 259 // for adding a callback multiple times.
255 static void RegisterInitializationCallback(FrameInitCallback); 260 static void RegisterInitializationCallback(FrameInitCallback);
256 261
257 // If the frame hosts a PluginDocument, this method returns the 262 // If the frame hosts a PluginDocument, this method returns the
258 // WebPluginContainerBase that hosts the plugin. If the provided node is a 263 // WebPluginContainerBase that hosts the plugin. If the provided node is a
259 // plugin, then it returns its WebPluginContainerBase. Otherwise, uses the 264 // plugin, then it returns its WebPluginContainerBase. Otherwise, uses the
(...skipping 20 matching lines...) Expand all
280 // Intentionally private to prevent redundant checks when the type is 285 // Intentionally private to prevent redundant checks when the type is
281 // already LocalFrame. 286 // already LocalFrame.
282 bool IsLocalFrame() const override { return true; } 287 bool IsLocalFrame() const override { return true; }
283 bool IsRemoteFrame() const override { return false; } 288 bool IsRemoteFrame() const override { return false; }
284 289
285 void EnableNavigation() { --navigation_disable_count_; } 290 void EnableNavigation() { --navigation_disable_count_; }
286 void DisableNavigation() { ++navigation_disable_count_; } 291 void DisableNavigation() { ++navigation_disable_count_; }
287 292
288 bool CanNavigateWithoutFramebusting(const Frame&, String& error_reason); 293 bool CanNavigateWithoutFramebusting(const Frame&, String& error_reason);
289 294
295 void PropagateInertToChildFrames();
296
290 std::unique_ptr<WebFrameScheduler> frame_scheduler_; 297 std::unique_ptr<WebFrameScheduler> frame_scheduler_;
291 298
292 mutable FrameLoader loader_; 299 mutable FrameLoader loader_;
293 Member<NavigationScheduler> navigation_scheduler_; 300 Member<NavigationScheduler> navigation_scheduler_;
294 301
295 // Cleared by LocalFrame::detach(), so as to keep the observable lifespan 302 // Cleared by LocalFrame::detach(), so as to keep the observable lifespan
296 // of LocalFrame::view(). 303 // of LocalFrame::view().
297 Member<LocalFrameView> view_; 304 Member<LocalFrameView> view_;
298 // Usually 0. Non-null if this is the top frame of PagePopup. 305 // Usually 0. Non-null if this is the top frame of PagePopup.
299 Member<Element> page_popup_owner_; 306 Member<Element> page_popup_owner_;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 explicit ScopedFrameBlamer(LocalFrame*); 422 explicit ScopedFrameBlamer(LocalFrame*);
416 ~ScopedFrameBlamer(); 423 ~ScopedFrameBlamer();
417 424
418 private: 425 private:
419 Member<LocalFrame> frame_; 426 Member<LocalFrame> frame_;
420 }; 427 };
421 428
422 } // namespace blink 429 } // namespace blink
423 430
424 #endif // LocalFrame_h 431 #endif // LocalFrame_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.cpp ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698