OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 3570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3581 } | 3581 } |
3582 } | 3582 } |
3583 | 3583 |
3584 NotificationPresenterImpl* WebViewImpl::notificationPresenterImpl() | 3584 NotificationPresenterImpl* WebViewImpl::notificationPresenterImpl() |
3585 { | 3585 { |
3586 if (!m_notificationPresenter.isInitialized() && m_client) | 3586 if (!m_notificationPresenter.isInitialized() && m_client) |
3587 m_notificationPresenter.initialize(m_client->notificationPresenter()); | 3587 m_notificationPresenter.initialize(m_client->notificationPresenter()); |
3588 return &m_notificationPresenter; | 3588 return &m_notificationPresenter; |
3589 } | 3589 } |
3590 | 3590 |
3591 Element* WebViewImpl::focusedElement() | 3591 Element* WebViewImpl::focusedElement() const |
3592 { | 3592 { |
3593 Frame* frame = m_page->focusController().focusedFrame(); | 3593 Frame* frame = m_page->focusController().focusedFrame(); |
3594 if (!frame) | 3594 if (!frame) |
3595 return 0; | 3595 return 0; |
3596 | 3596 |
3597 Document* document = frame->document(); | 3597 Document* document = frame->document(); |
3598 if (!document) | 3598 if (!document) |
3599 return 0; | 3599 return 0; |
3600 | 3600 |
3601 return document->focusedElement(); | 3601 return document->focusedElement(); |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3987 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 3987 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
3988 | 3988 |
3989 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 3989 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
3990 return false; | 3990 return false; |
3991 | 3991 |
3992 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 3992 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
3993 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 3993 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
3994 } | 3994 } |
3995 | 3995 |
3996 } // namespace blink | 3996 } // namespace blink |
OLD | NEW |