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

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: Account for Inert attribute 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;
127 130
128 void DetachChildren(); 131 void DetachChildren();
129 void DocumentAttached(); 132 void DocumentAttached();
130 133
131 // Note: these two functions are not virtual but intentionally shadow the 134 // Note: these two functions are not virtual but intentionally shadow the
132 // corresponding method in the Frame base class to return the 135 // corresponding method in the Frame base class to return the
133 // LocalFrame-specific subclass. 136 // LocalFrame-specific subclass.
134 LocalWindowProxy* WindowProxy(DOMWrapperWorld&); 137 LocalWindowProxy* WindowProxy(DOMWrapperWorld&);
135 LocalDOMWindow* DomWindow() const; 138 LocalDOMWindow* DomWindow() const;
136 void SetDOMWindow(LocalDOMWindow*); 139 void SetDOMWindow(LocalDOMWindow*);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 236
234 PerformanceMonitor* GetPerformanceMonitor() { return performance_monitor_; } 237 PerformanceMonitor* GetPerformanceMonitor() { return performance_monitor_; }
235 238
236 // Convenience function to allow loading image placeholders for the request if 239 // Convenience function to allow loading image placeholders for the request if
237 // either the flag in Settings() for using image placeholders is set, or if 240 // either the flag in Settings() for using image placeholders is set, or if
238 // the embedder decides that Client Lo-Fi should be used for this request. 241 // the embedder decides that Client Lo-Fi should be used for this request.
239 void MaybeAllowImagePlaceholder(FetchParameters&) const; 242 void MaybeAllowImagePlaceholder(FetchParameters&) const;
240 243
241 std::unique_ptr<WebURLLoader> CreateURLLoader(); 244 std::unique_ptr<WebURLLoader> CreateURLLoader();
242 245
246 bool IsInert() const { return is_inert_; }
247
243 using FrameInitCallback = void (*)(LocalFrame*); 248 using FrameInitCallback = void (*)(LocalFrame*);
244 // Allows for the registration of a callback that is invoked whenever a new 249 // Allows for the registration of a callback that is invoked whenever a new
245 // LocalFrame is initialized. Callbacks are executed in the order that they 250 // LocalFrame is initialized. Callbacks are executed in the order that they
246 // were added using registerInitializationCallback, and there are no checks 251 // were added using registerInitializationCallback, and there are no checks
247 // for adding a callback multiple times. 252 // for adding a callback multiple times.
248 static void RegisterInitializationCallback(FrameInitCallback); 253 static void RegisterInitializationCallback(FrameInitCallback);
249 254
250 // If the frame hosts a PluginDocument, this method returns the 255 // If the frame hosts a PluginDocument, this method returns the
251 // WebPluginContainerBase that hosts the plugin. If the provided node is a 256 // WebPluginContainerBase that hosts the plugin. If the provided node is a
252 // plugin, then it returns its WebPluginContainerBase. Otherwise, uses the 257 // plugin, then it returns its WebPluginContainerBase. Otherwise, uses the
(...skipping 14 matching lines...) Expand all
267 // Intentionally private to prevent redundant checks when the type is 272 // Intentionally private to prevent redundant checks when the type is
268 // already LocalFrame. 273 // already LocalFrame.
269 bool IsLocalFrame() const override { return true; } 274 bool IsLocalFrame() const override { return true; }
270 bool IsRemoteFrame() const override { return false; } 275 bool IsRemoteFrame() const override { return false; }
271 276
272 void EnableNavigation() { --navigation_disable_count_; } 277 void EnableNavigation() { --navigation_disable_count_; }
273 void DisableNavigation() { ++navigation_disable_count_; } 278 void DisableNavigation() { ++navigation_disable_count_; }
274 279
275 bool CanNavigateWithoutFramebusting(const Frame&, String& error_reason); 280 bool CanNavigateWithoutFramebusting(const Frame&, String& error_reason);
276 281
282 void PropagateInertToChildFrames();
283
277 std::unique_ptr<WebFrameScheduler> frame_scheduler_; 284 std::unique_ptr<WebFrameScheduler> frame_scheduler_;
278 285
279 mutable FrameLoader loader_; 286 mutable FrameLoader loader_;
280 Member<NavigationScheduler> navigation_scheduler_; 287 Member<NavigationScheduler> navigation_scheduler_;
281 288
282 // Cleared by LocalFrame::detach(), so as to keep the observable lifespan 289 // Cleared by LocalFrame::detach(), so as to keep the observable lifespan
283 // of LocalFrame::view(). 290 // of LocalFrame::view().
284 Member<LocalFrameView> view_; 291 Member<LocalFrameView> view_;
285 // Usually 0. Non-null if this is the top frame of PagePopup. 292 // Usually 0. Non-null if this is the top frame of PagePopup.
286 Member<Element> page_popup_owner_; 293 Member<Element> page_popup_owner_;
287 294
288 const Member<ScriptController> script_controller_; 295 const Member<ScriptController> script_controller_;
289 const Member<Editor> editor_; 296 const Member<Editor> editor_;
290 const Member<SpellChecker> spell_checker_; 297 const Member<SpellChecker> spell_checker_;
291 const Member<FrameSelection> selection_; 298 const Member<FrameSelection> selection_;
292 const Member<EventHandler> event_handler_; 299 const Member<EventHandler> event_handler_;
293 const Member<FrameConsole> console_; 300 const Member<FrameConsole> console_;
294 const Member<InputMethodController> input_method_controller_; 301 const Member<InputMethodController> input_method_controller_;
295 302
296 int navigation_disable_count_; 303 int navigation_disable_count_;
297 304
298 float page_zoom_factor_; 305 float page_zoom_factor_;
299 float text_zoom_factor_; 306 float text_zoom_factor_;
300 307
301 bool in_view_source_mode_; 308 bool in_view_source_mode_;
302 309
310 bool is_inert_;
311
303 Member<CoreProbeSink> probe_sink_; 312 Member<CoreProbeSink> probe_sink_;
304 Member<PerformanceMonitor> performance_monitor_; 313 Member<PerformanceMonitor> performance_monitor_;
305 314
306 InterfaceProvider* const interface_provider_; 315 InterfaceProvider* const interface_provider_;
307 InterfaceRegistry* const interface_registry_; 316 InterfaceRegistry* const interface_registry_;
308 }; 317 };
309 318
310 inline FrameLoader& LocalFrame::Loader() const { 319 inline FrameLoader& LocalFrame::Loader() const {
311 return loader_; 320 return loader_;
312 } 321 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 explicit ScopedFrameBlamer(LocalFrame*); 408 explicit ScopedFrameBlamer(LocalFrame*);
400 ~ScopedFrameBlamer(); 409 ~ScopedFrameBlamer();
401 410
402 private: 411 private:
403 Member<LocalFrame> frame_; 412 Member<LocalFrame> frame_;
404 }; 413 };
405 414
406 } // namespace blink 415 } // namespace blink
407 416
408 #endif // LocalFrame_h 417 #endif // LocalFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698