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 4110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4121 } | 4121 } |
4122 | 4122 |
4123 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, | 4123 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, |
4124 bool isInitialState) { | 4124 bool isInitialState) { |
4125 if (!page()) | 4125 if (!page()) |
4126 return; | 4126 return; |
4127 | 4127 |
4128 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden || visibilityState == WebPageVisibilityStatePrere
nder); | 4128 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden || visibilityState == WebPageVisibilityStatePrere
nder); |
4129 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); | 4129 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); |
4130 | 4130 |
| 4131 bool visible = visibilityState == WebPageVisibilityStateVisible; |
4131 if (m_layerTreeView) { | 4132 if (m_layerTreeView) { |
4132 bool visible = visibilityState == WebPageVisibilityStateVisible; | |
4133 m_layerTreeView->setVisible(visible); | 4133 m_layerTreeView->setVisible(visible); |
4134 } | 4134 } |
4135 } | 4135 } |
4136 | 4136 |
4137 bool WebViewImpl::requestPointerLock() | 4137 bool WebViewImpl::requestPointerLock() |
4138 { | 4138 { |
4139 return m_client && m_client->requestPointerLock(); | 4139 return m_client && m_client->requestPointerLock(); |
4140 } | 4140 } |
4141 | 4141 |
4142 void WebViewImpl::requestPointerUnlock() | 4142 void WebViewImpl::requestPointerUnlock() |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4188 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4188 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4189 | 4189 |
4190 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4190 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4191 return false; | 4191 return false; |
4192 | 4192 |
4193 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4193 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4194 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4194 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4195 } | 4195 } |
4196 | 4196 |
4197 } // namespace blink | 4197 } // namespace blink |
OLD | NEW |