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