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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 const WebFindOptions&, bool reset); | 407 const WebFindOptions&, bool reset); |
408 | 408 |
409 // Determines whether to invalidate the content area and scrollbar. | 409 // Determines whether to invalidate the content area and scrollbar. |
410 void invalidateIfNecessary(); | 410 void invalidateIfNecessary(); |
411 | 411 |
412 void loadJavaScriptURL(const WebCore::KURL&); | 412 void loadJavaScriptURL(const WebCore::KURL&); |
413 | 413 |
414 // Returns a hit-tested VisiblePosition for the given point | 414 // Returns a hit-tested VisiblePosition for the given point |
415 WebCore::VisiblePosition visiblePositionForWindowPoint(const WebPoint&); | 415 WebCore::VisiblePosition visiblePositionForWindowPoint(const WebPoint&); |
416 | 416 |
417 FrameLoaderClientImpl m_frameLoaderClient; | 417 class WebFrameInit : public WebCore::FrameInit { |
| 418 public: |
| 419 static PassRefPtr<WebFrameInit> create(WebFrameImpl* webFrameImpl, int64
_t frameID) |
| 420 { |
| 421 return adoptRef(new WebFrameInit(webFrameImpl, frameID)); |
| 422 } |
| 423 |
| 424 private: |
| 425 WebFrameInit(WebFrameImpl* webFrameImpl, int64_t frameID) |
| 426 : WebCore::FrameInit(frameID) |
| 427 , m_frameLoaderClientImpl(webFrameImpl) |
| 428 { |
| 429 setFrameLoaderClient(&m_frameLoaderClientImpl); |
| 430 } |
| 431 |
| 432 FrameLoaderClientImpl m_frameLoaderClientImpl; |
| 433 }; |
| 434 RefPtr<WebFrameInit> m_frameInit; |
418 | 435 |
419 WebFrameClient* m_client; | 436 WebFrameClient* m_client; |
420 | 437 |
421 // A way for the main frame to keep track of which frame has an active | 438 // A way for the main frame to keep track of which frame has an active |
422 // match. Should be 0 for all other frames. | 439 // match. Should be 0 for all other frames. |
423 WebFrameImpl* m_currentActiveMatchFrame; | 440 WebFrameImpl* m_currentActiveMatchFrame; |
424 | 441 |
425 // The range of the active match for the current frame. | 442 // The range of the active match for the current frame. |
426 RefPtr<WebCore::Range> m_activeMatch; | 443 RefPtr<WebCore::Range> m_activeMatch; |
427 | 444 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 bool m_findMatchRectsAreValid; | 505 bool m_findMatchRectsAreValid; |
489 | 506 |
490 // Contents size when find-in-page match rects were last computed for this | 507 // Contents size when find-in-page match rects were last computed for this |
491 // frame's cache. | 508 // frame's cache. |
492 WebCore::IntSize m_contentsSizeForCurrentFindMatchRects; | 509 WebCore::IntSize m_contentsSizeForCurrentFindMatchRects; |
493 | 510 |
494 // Valid between calls to BeginPrint() and EndPrint(). Containts the print | 511 // Valid between calls to BeginPrint() and EndPrint(). Containts the print |
495 // information. Is used by PrintPage(). | 512 // information. Is used by PrintPage(). |
496 OwnPtr<ChromePrintContext> m_printContext; | 513 OwnPtr<ChromePrintContext> m_printContext; |
497 | 514 |
498 // The identifier of this frame. | |
499 long long m_embedderIdentifier; | |
500 | |
501 // Ensure we don't overwrite valid history data during same document loads | 515 // Ensure we don't overwrite valid history data during same document loads |
502 // from HistoryItems | 516 // from HistoryItems |
503 bool m_inSameDocumentHistoryLoad; | 517 bool m_inSameDocumentHistoryLoad; |
504 | 518 |
505 // Stores the additional input evetns scale when device metrics emulation is
enabled. | 519 // Stores the additional input evetns scale when device metrics emulation is
enabled. |
506 float m_inputEventsScaleFactorForEmulation; | 520 float m_inputEventsScaleFactorForEmulation; |
507 }; | 521 }; |
508 | 522 |
509 inline WebFrameImpl* toWebFrameImpl(WebFrame* webFrame) | 523 inline WebFrameImpl* toWebFrameImpl(WebFrame* webFrame) |
510 { | 524 { |
511 return static_cast<WebFrameImpl*>(webFrame); | 525 return static_cast<WebFrameImpl*>(webFrame); |
512 } | 526 } |
513 | 527 |
514 inline const WebFrameImpl* toWebFrameImpl(const WebFrame* webFrame) | 528 inline const WebFrameImpl* toWebFrameImpl(const WebFrame* webFrame) |
515 { | 529 { |
516 return static_cast<const WebFrameImpl*>(webFrame); | 530 return static_cast<const WebFrameImpl*>(webFrame); |
517 } | 531 } |
518 | 532 |
519 // This will catch anyone doing an unnecessary cast. | 533 // This will catch anyone doing an unnecessary cast. |
520 void toWebFrameImpl(const WebFrameImpl*); | 534 void toWebFrameImpl(const WebFrameImpl*); |
521 | 535 |
522 } // namespace WebKit | 536 } // namespace WebKit |
523 | 537 |
524 #endif | 538 #endif |
OLD | NEW |