Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 143803020: Minor Refator: Change signature of focusedElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Commit message updated Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« Source/web/WebViewImpl.h ('K') | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« Source/web/WebViewImpl.h ('K') | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698