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

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: Set Frame's inert bit on style calculation 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 UserGestureStatus) override; 117 UserGestureStatus) override;
118 void Navigate(const FrameLoadRequest&) override; 118 void Navigate(const FrameLoadRequest&) override;
119 void Reload(FrameLoadType, ClientRedirectPolicy) override; 119 void Reload(FrameLoadType, ClientRedirectPolicy) override;
120 void Detach(FrameDetachType) override; 120 void Detach(FrameDetachType) override;
121 bool ShouldClose() override; 121 bool ShouldClose() override;
122 SecurityContext* GetSecurityContext() const override; 122 SecurityContext* GetSecurityContext() const override;
123 void PrintNavigationErrorMessage(const Frame&, const char* reason) override; 123 void PrintNavigationErrorMessage(const Frame&, const char* reason) override;
124 void PrintNavigationWarning(const String&) override; 124 void PrintNavigationWarning(const String&) override;
125 bool PrepareForCommit() override; 125 bool PrepareForCommit() override;
126 void DidChangeVisibilityState() override; 126 void DidChangeVisibilityState() override;
127 // This sets the is_inert_ flag and also recurses through this frame's
128 // subtree, updating the inert bit on all descendant frames.
129 void SetIsInert(bool) override;
130 bool IsInert() const override { return is_inert_; }
127 131
128 void DetachChildren(); 132 void DetachChildren();
129 void DocumentAttached(); 133 void DocumentAttached();
130 134
131 // Note: these two functions are not virtual but intentionally shadow the 135 // Note: these two functions are not virtual but intentionally shadow the
132 // corresponding method in the Frame base class to return the 136 // corresponding method in the Frame base class to return the
133 // LocalFrame-specific subclass. 137 // LocalFrame-specific subclass.
134 LocalWindowProxy* WindowProxy(DOMWrapperWorld&); 138 LocalWindowProxy* WindowProxy(DOMWrapperWorld&);
135 LocalDOMWindow* DomWindow() const; 139 LocalDOMWindow* DomWindow() const;
136 void SetDOMWindow(LocalDOMWindow*); 140 void SetDOMWindow(LocalDOMWindow*);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Intentionally private to prevent redundant checks when the type is 271 // Intentionally private to prevent redundant checks when the type is
268 // already LocalFrame. 272 // already LocalFrame.
269 bool IsLocalFrame() const override { return true; } 273 bool IsLocalFrame() const override { return true; }
270 bool IsRemoteFrame() const override { return false; } 274 bool IsRemoteFrame() const override { return false; }
271 275
272 void EnableNavigation() { --navigation_disable_count_; } 276 void EnableNavigation() { --navigation_disable_count_; }
273 void DisableNavigation() { ++navigation_disable_count_; } 277 void DisableNavigation() { ++navigation_disable_count_; }
274 278
275 bool CanNavigateWithoutFramebusting(const Frame&, String& error_reason); 279 bool CanNavigateWithoutFramebusting(const Frame&, String& error_reason);
276 280
281 void PropagateInertToChildFrames();
282
277 std::unique_ptr<WebFrameScheduler> frame_scheduler_; 283 std::unique_ptr<WebFrameScheduler> frame_scheduler_;
278 284
279 mutable FrameLoader loader_; 285 mutable FrameLoader loader_;
280 Member<NavigationScheduler> navigation_scheduler_; 286 Member<NavigationScheduler> navigation_scheduler_;
281 287
282 // Cleared by LocalFrame::detach(), so as to keep the observable lifespan 288 // Cleared by LocalFrame::detach(), so as to keep the observable lifespan
283 // of LocalFrame::view(). 289 // of LocalFrame::view().
284 Member<LocalFrameView> view_; 290 Member<LocalFrameView> view_;
285 // Usually 0. Non-null if this is the top frame of PagePopup. 291 // Usually 0. Non-null if this is the top frame of PagePopup.
286 Member<Element> page_popup_owner_; 292 Member<Element> page_popup_owner_;
287 293
288 const Member<ScriptController> script_controller_; 294 const Member<ScriptController> script_controller_;
289 const Member<Editor> editor_; 295 const Member<Editor> editor_;
290 const Member<SpellChecker> spell_checker_; 296 const Member<SpellChecker> spell_checker_;
291 const Member<FrameSelection> selection_; 297 const Member<FrameSelection> selection_;
292 const Member<EventHandler> event_handler_; 298 const Member<EventHandler> event_handler_;
293 const Member<FrameConsole> console_; 299 const Member<FrameConsole> console_;
294 const Member<InputMethodController> input_method_controller_; 300 const Member<InputMethodController> input_method_controller_;
295 301
296 int navigation_disable_count_; 302 int navigation_disable_count_;
297 303
298 float page_zoom_factor_; 304 float page_zoom_factor_;
299 float text_zoom_factor_; 305 float text_zoom_factor_;
300 306
301 bool in_view_source_mode_; 307 bool in_view_source_mode_;
302 308
309 bool is_inert_;
310
303 Member<CoreProbeSink> probe_sink_; 311 Member<CoreProbeSink> probe_sink_;
304 Member<PerformanceMonitor> performance_monitor_; 312 Member<PerformanceMonitor> performance_monitor_;
305 313
306 InterfaceProvider* const interface_provider_; 314 InterfaceProvider* const interface_provider_;
307 InterfaceRegistry* const interface_registry_; 315 InterfaceRegistry* const interface_registry_;
308 }; 316 };
309 317
310 inline FrameLoader& LocalFrame::Loader() const { 318 inline FrameLoader& LocalFrame::Loader() const {
311 return loader_; 319 return loader_;
312 } 320 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 explicit ScopedFrameBlamer(LocalFrame*); 407 explicit ScopedFrameBlamer(LocalFrame*);
400 ~ScopedFrameBlamer(); 408 ~ScopedFrameBlamer();
401 409
402 private: 410 private:
403 Member<LocalFrame> frame_; 411 Member<LocalFrame> frame_;
404 }; 412 };
405 413
406 } // namespace blink 414 } // namespace blink
407 415
408 #endif // LocalFrame_h 416 #endif // LocalFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698