OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 HTMLFrameOwnerElement*); | 312 HTMLFrameOwnerElement*); |
313 | 313 |
314 void didChangeContentsSize(const IntSize&); | 314 void didChangeContentsSize(const IntSize&); |
315 | 315 |
316 void createFrameView(); | 316 void createFrameView(); |
317 | 317 |
318 static WebLocalFrameImpl* fromFrame(LocalFrame*); | 318 static WebLocalFrameImpl* fromFrame(LocalFrame*); |
319 static WebLocalFrameImpl* fromFrame(LocalFrame&); | 319 static WebLocalFrameImpl* fromFrame(LocalFrame&); |
320 static WebLocalFrameImpl* fromFrameOwnerElement(Element*); | 320 static WebLocalFrameImpl* fromFrameOwnerElement(Element*); |
321 | 321 |
322 // If the frame hosts a PluginDocument, this method returns the WebPluginConta
inerImpl | 322 // If the frame hosts a PluginDocument, this method returns the |
323 // that hosts the plugin. | 323 // WebPluginContainerImpl that hosts the plugin. |
324 static WebPluginContainerImpl* pluginContainerFromFrame(LocalFrame*); | 324 static WebPluginContainerImpl* pluginContainerFromFrame(LocalFrame*); |
325 | 325 |
326 // If the frame hosts a PluginDocument, this method returns the WebPluginConta
inerImpl | 326 // If the frame hosts a PluginDocument, this method returns the |
327 // that hosts the plugin. If the provided node is a plugin, then it runs its | 327 // WebPluginContainerImpl that hosts the plugin. If the provided node is a |
328 // WebPluginContainerImpl. Otherwise, uses the currently focused element (if a
ny). | 328 // plugin, then it runs its WebPluginContainerImpl. Otherwise, uses the |
| 329 // currently focused element (if any). |
329 static WebPluginContainerImpl* currentPluginContainer(LocalFrame*, | 330 static WebPluginContainerImpl* currentPluginContainer(LocalFrame*, |
330 Node* = nullptr); | 331 Node* = nullptr); |
331 | 332 |
332 WebViewImpl* viewImpl() const; | 333 WebViewImpl* viewImpl() const; |
333 | 334 |
334 FrameView* frameView() const { return frame() ? frame()->view() : 0; } | 335 FrameView* frameView() const { return frame() ? frame()->view() : 0; } |
335 | 336 |
336 WebDevToolsAgentImpl* devToolsAgentImpl() const { | 337 WebDevToolsAgentImpl* devToolsAgentImpl() const { |
337 return m_devToolsAgent.get(); | 338 return m_devToolsAgent.get(); |
338 } | 339 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 HitTestResult hitTestResultForVisualViewportPos(const IntPoint&); | 416 HitTestResult hitTestResultForVisualViewportPos(const IntPoint&); |
416 | 417 |
417 WebPlugin* focusedPluginIfInputMethodSupported(); | 418 WebPlugin* focusedPluginIfInputMethodSupported(); |
418 ScrollableArea* layoutViewportScrollableArea() const; | 419 ScrollableArea* layoutViewportScrollableArea() const; |
419 | 420 |
420 // Returns true if the frame is focused. | 421 // Returns true if the frame is focused. |
421 bool isFocused() const; | 422 bool isFocused() const; |
422 | 423 |
423 Member<FrameLoaderClientImpl> m_frameLoaderClientImpl; | 424 Member<FrameLoaderClientImpl> m_frameLoaderClientImpl; |
424 | 425 |
425 // The embedder retains a reference to the WebCore LocalFrame while it is acti
ve in the DOM. This | 426 // The embedder retains a reference to the WebCore LocalFrame while it is |
426 // reference is released when the frame is removed from the DOM or the entire
page is closed. | 427 // active in the DOM. This reference is released when the frame is removed |
427 // FIXME: These will need to change to WebFrame when we introduce WebFrameProx
y. | 428 // from the DOM or the entire page is closed. FIXME: These will need to |
| 429 // change to WebFrame when we introduce WebFrameProxy. |
428 Member<LocalFrame> m_frame; | 430 Member<LocalFrame> m_frame; |
429 | 431 |
430 Member<WebDevToolsAgentImpl> m_devToolsAgent; | 432 Member<WebDevToolsAgentImpl> m_devToolsAgent; |
431 | 433 |
432 // This is set if the frame is the root of a local frame tree, and requires a
widget for layout. | 434 // This is set if the frame is the root of a local frame tree, and requires a |
| 435 // widget for layout. |
433 WebFrameWidgetBase* m_frameWidget; | 436 WebFrameWidgetBase* m_frameWidget; |
434 | 437 |
435 WebFrameClient* m_client; | 438 WebFrameClient* m_client; |
436 WebAutofillClient* m_autofillClient; | 439 WebAutofillClient* m_autofillClient; |
437 WebContentSettingsClient* m_contentSettingsClient; | 440 WebContentSettingsClient* m_contentSettingsClient; |
438 std::unique_ptr<SharedWorkerRepositoryClientImpl> | 441 std::unique_ptr<SharedWorkerRepositoryClientImpl> |
439 m_sharedWorkerRepositoryClient; | 442 m_sharedWorkerRepositoryClient; |
440 | 443 |
441 // Will be initialized after first call to ensureTextFinder(). | 444 // Will be initialized after first call to ensureTextFinder(). |
442 Member<TextFinder> m_textFinder; | 445 Member<TextFinder> m_textFinder; |
443 | 446 |
444 // Valid between calls to BeginPrint() and EndPrint(). Containts the print | 447 // Valid between calls to BeginPrint() and EndPrint(). Containts the print |
445 // information. Is used by PrintPage(). | 448 // information. Is used by PrintPage(). |
446 Member<ChromePrintContext> m_printContext; | 449 Member<ChromePrintContext> m_printContext; |
447 | 450 |
448 // Stores the additional input events offset and scale when device metrics emu
lation is enabled. | 451 // Stores the additional input events offset and scale when device metrics |
| 452 // emulation is enabled. |
449 IntSize m_inputEventsOffsetForEmulation; | 453 IntSize m_inputEventsOffsetForEmulation; |
450 float m_inputEventsScaleFactorForEmulation; | 454 float m_inputEventsScaleFactorForEmulation; |
451 | 455 |
452 WebDevToolsFrontendImpl* m_webDevToolsFrontend; | 456 WebDevToolsFrontendImpl* m_webDevToolsFrontend; |
453 | 457 |
454 Member<Node> m_contextMenuNode; | 458 Member<Node> m_contextMenuNode; |
455 | 459 |
456 // Oilpan: WebLocalFrameImpl must remain alive until close() is called. | 460 // Oilpan: WebLocalFrameImpl must remain alive until close() is called. |
457 // Accomplish that by keeping a self-referential Persistent<>. It is | 461 // Accomplish that by keeping a self-referential Persistent<>. It is |
458 // cleared upon close(). | 462 // cleared upon close(). |
459 SelfKeepAlive<WebLocalFrameImpl> m_selfKeepAlive; | 463 SelfKeepAlive<WebLocalFrameImpl> m_selfKeepAlive; |
460 }; | 464 }; |
461 | 465 |
462 DEFINE_TYPE_CASTS(WebLocalFrameImpl, | 466 DEFINE_TYPE_CASTS(WebLocalFrameImpl, |
463 WebFrame, | 467 WebFrame, |
464 frame, | 468 frame, |
465 frame->isWebLocalFrame(), | 469 frame->isWebLocalFrame(), |
466 frame.isWebLocalFrame()); | 470 frame.isWebLocalFrame()); |
467 | 471 |
468 } // namespace blink | 472 } // namespace blink |
469 | 473 |
470 #endif | 474 #endif |
OLD | NEW |