Chromium Code Reviews| 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_; } | |
|
alexmos
2017/06/16 02:17:58
Is this used anywhere? I might've missed it, but
kenrb
2017/06/19 19:26:23
Yes, in Node::IsInert().
alexmos
2017/06/20 18:46:10
Acknowledged.
| |
| 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_; |
| 305 | 312 |
| 306 const Member<ScriptController> script_controller_; | 313 const Member<ScriptController> script_controller_; |
| 307 const Member<Editor> editor_; | 314 const Member<Editor> editor_; |
| 308 const Member<SpellChecker> spell_checker_; | 315 const Member<SpellChecker> spell_checker_; |
| 309 const Member<FrameSelection> selection_; | 316 const Member<FrameSelection> selection_; |
| 310 const Member<EventHandler> event_handler_; | 317 const Member<EventHandler> event_handler_; |
| 311 const Member<FrameConsole> console_; | 318 const Member<FrameConsole> console_; |
| 312 const Member<InputMethodController> input_method_controller_; | 319 const Member<InputMethodController> input_method_controller_; |
| 313 | 320 |
| 314 int navigation_disable_count_; | 321 int navigation_disable_count_; |
| 315 | 322 |
| 316 float page_zoom_factor_; | 323 float page_zoom_factor_; |
| 317 float text_zoom_factor_; | 324 float text_zoom_factor_; |
| 318 | 325 |
| 319 bool in_view_source_mode_; | 326 bool in_view_source_mode_; |
| 320 | 327 |
| 328 bool is_inert_; | |
| 329 | |
| 321 Member<CoreProbeSink> probe_sink_; | 330 Member<CoreProbeSink> probe_sink_; |
| 322 Member<PerformanceMonitor> performance_monitor_; | 331 Member<PerformanceMonitor> performance_monitor_; |
| 323 | 332 |
| 324 InterfaceProvider* const interface_provider_; | 333 InterfaceProvider* const interface_provider_; |
| 325 InterfaceRegistry* const interface_registry_; | 334 InterfaceRegistry* const interface_registry_; |
| 326 | 335 |
| 327 IntRect remote_viewport_intersection_; | 336 IntRect remote_viewport_intersection_; |
| 328 Member<FrameResourceCoordinator> frame_resource_coordinator_; | 337 Member<FrameResourceCoordinator> frame_resource_coordinator_; |
| 329 }; | 338 }; |
| 330 | 339 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 420 explicit ScopedFrameBlamer(LocalFrame*); | 429 explicit ScopedFrameBlamer(LocalFrame*); |
| 421 ~ScopedFrameBlamer(); | 430 ~ScopedFrameBlamer(); |
| 422 | 431 |
| 423 private: | 432 private: |
| 424 Member<LocalFrame> frame_; | 433 Member<LocalFrame> frame_; |
| 425 }; | 434 }; |
| 426 | 435 |
| 427 } // namespace blink | 436 } // namespace blink |
| 428 | 437 |
| 429 #endif // LocalFrame_h | 438 #endif // LocalFrame_h |
| OLD | NEW |