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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 PerformanceMonitor* GetPerformanceMonitor() { return performance_monitor_; } | 231 PerformanceMonitor* GetPerformanceMonitor() { return performance_monitor_; } |
232 | 232 |
233 // Convenience function to allow loading image placeholders for the request if | 233 // Convenience function to allow loading image placeholders for the request if |
234 // either the flag in Settings() for using image placeholders is set, or if | 234 // either the flag in Settings() for using image placeholders is set, or if |
235 // the embedder decides that Client Lo-Fi should be used for this request. | 235 // the embedder decides that Client Lo-Fi should be used for this request. |
236 void MaybeAllowImagePlaceholder(FetchParameters&) const; | 236 void MaybeAllowImagePlaceholder(FetchParameters&) const; |
237 | 237 |
238 std::unique_ptr<WebURLLoader> CreateURLLoader(); | 238 std::unique_ptr<WebURLLoader> CreateURLLoader(); |
239 | 239 |
| 240 // This sets the is_inert_ flag and also recurses through this frame's |
| 241 // subtree, updating the inert bit on all descendant frames. |
| 242 void SetIsInert(bool inert); |
| 243 bool IsInert() const { return is_inert_; } |
| 244 |
240 using FrameInitCallback = void (*)(LocalFrame*); | 245 using FrameInitCallback = void (*)(LocalFrame*); |
241 // Allows for the registration of a callback that is invoked whenever a new | 246 // Allows for the registration of a callback that is invoked whenever a new |
242 // LocalFrame is initialized. Callbacks are executed in the order that they | 247 // LocalFrame is initialized. Callbacks are executed in the order that they |
243 // were added using registerInitializationCallback, and there are no checks | 248 // were added using registerInitializationCallback, and there are no checks |
244 // for adding a callback multiple times. | 249 // for adding a callback multiple times. |
245 static void RegisterInitializationCallback(FrameInitCallback); | 250 static void RegisterInitializationCallback(FrameInitCallback); |
246 | 251 |
247 private: | 252 private: |
248 friend class FrameNavigationDisabler; | 253 friend class FrameNavigationDisabler; |
249 | 254 |
250 LocalFrame(LocalFrameClient*, | 255 LocalFrame(LocalFrameClient*, |
251 Page&, | 256 Page&, |
252 FrameOwner*, | 257 FrameOwner*, |
253 InterfaceProvider*, | 258 InterfaceProvider*, |
254 InterfaceRegistry*); | 259 InterfaceRegistry*); |
255 | 260 |
256 // Intentionally private to prevent redundant checks when the type is | 261 // Intentionally private to prevent redundant checks when the type is |
257 // already LocalFrame. | 262 // already LocalFrame. |
258 bool IsLocalFrame() const override { return true; } | 263 bool IsLocalFrame() const override { return true; } |
259 bool IsRemoteFrame() const override { return false; } | 264 bool IsRemoteFrame() const override { return false; } |
260 | 265 |
261 void EnableNavigation() { --navigation_disable_count_; } | 266 void EnableNavigation() { --navigation_disable_count_; } |
262 void DisableNavigation() { ++navigation_disable_count_; } | 267 void DisableNavigation() { ++navigation_disable_count_; } |
263 | 268 |
| 269 void PropagateInertToChildFrames(); |
| 270 |
264 std::unique_ptr<WebFrameScheduler> frame_scheduler_; | 271 std::unique_ptr<WebFrameScheduler> frame_scheduler_; |
265 | 272 |
266 mutable FrameLoader loader_; | 273 mutable FrameLoader loader_; |
267 Member<NavigationScheduler> navigation_scheduler_; | 274 Member<NavigationScheduler> navigation_scheduler_; |
268 | 275 |
269 // Cleared by LocalFrame::detach(), so as to keep the observable lifespan | 276 // Cleared by LocalFrame::detach(), so as to keep the observable lifespan |
270 // of LocalFrame::view(). | 277 // of LocalFrame::view(). |
271 Member<FrameView> view_; | 278 Member<FrameView> view_; |
272 // Usually 0. Non-null if this is the top frame of PagePopup. | 279 // Usually 0. Non-null if this is the top frame of PagePopup. |
273 Member<Element> page_popup_owner_; | 280 Member<Element> page_popup_owner_; |
274 | 281 |
275 const Member<ScriptController> script_controller_; | 282 const Member<ScriptController> script_controller_; |
276 const Member<Editor> editor_; | 283 const Member<Editor> editor_; |
277 const Member<SpellChecker> spell_checker_; | 284 const Member<SpellChecker> spell_checker_; |
278 const Member<FrameSelection> selection_; | 285 const Member<FrameSelection> selection_; |
279 const Member<EventHandler> event_handler_; | 286 const Member<EventHandler> event_handler_; |
280 const Member<FrameConsole> console_; | 287 const Member<FrameConsole> console_; |
281 const Member<InputMethodController> input_method_controller_; | 288 const Member<InputMethodController> input_method_controller_; |
282 | 289 |
283 int navigation_disable_count_; | 290 int navigation_disable_count_; |
284 | 291 |
285 float page_zoom_factor_; | 292 float page_zoom_factor_; |
286 float text_zoom_factor_; | 293 float text_zoom_factor_; |
287 | 294 |
288 bool in_view_source_mode_; | 295 bool in_view_source_mode_; |
289 | 296 |
| 297 bool is_inert_; |
| 298 |
290 Member<CoreProbeSink> probe_sink_; | 299 Member<CoreProbeSink> probe_sink_; |
291 Member<PerformanceMonitor> performance_monitor_; | 300 Member<PerformanceMonitor> performance_monitor_; |
292 | 301 |
293 InterfaceProvider* const interface_provider_; | 302 InterfaceProvider* const interface_provider_; |
294 InterfaceRegistry* const interface_registry_; | 303 InterfaceRegistry* const interface_registry_; |
295 }; | 304 }; |
296 | 305 |
297 inline FrameLoader& LocalFrame::Loader() const { | 306 inline FrameLoader& LocalFrame::Loader() const { |
298 return loader_; | 307 return loader_; |
299 } | 308 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 explicit ScopedFrameBlamer(LocalFrame*); | 395 explicit ScopedFrameBlamer(LocalFrame*); |
387 ~ScopedFrameBlamer(); | 396 ~ScopedFrameBlamer(); |
388 | 397 |
389 private: | 398 private: |
390 Member<LocalFrame> frame_; | 399 Member<LocalFrame> frame_; |
391 }; | 400 }; |
392 | 401 |
393 } // namespace blink | 402 } // namespace blink |
394 | 403 |
395 #endif // LocalFrame_h | 404 #endif // LocalFrame_h |
OLD | NEW |