| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/frame/TopControls.h" | 5 #include "core/frame/TopControls.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameHost.h" | 7 #include "core/frame/FrameHost.h" |
| 8 #include "core/frame/VisualViewport.h" |
| 8 #include "core/page/ChromeClient.h" | 9 #include "core/page/ChromeClient.h" |
| 9 #include "platform/geometry/FloatSize.h" | 10 #include "platform/geometry/FloatSize.h" |
| 10 #include <algorithm> // for std::min and std::max | 11 #include <algorithm> // for std::min and std::max |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 TopControls::TopControls(const FrameHost& frameHost) | 15 TopControls::TopControls(const FrameHost& frameHost) |
| 15 : m_frameHost(&frameHost) | 16 : m_frameHost(&frameHost) |
| 16 , m_height(0) | 17 , m_height(0) |
| 17 , m_shownRatio(0) | 18 , m_shownRatio(0) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 { | 104 { |
| 104 if (m_height == height && m_shrinkViewport == shrinkViewport) | 105 if (m_height == height && m_shrinkViewport == shrinkViewport) |
| 105 return; | 106 return; |
| 106 | 107 |
| 107 m_height = height; | 108 m_height = height; |
| 108 m_shrinkViewport = shrinkViewport; | 109 m_shrinkViewport = shrinkViewport; |
| 109 m_frameHost->chromeClient().didUpdateTopControls(); | 110 m_frameHost->chromeClient().didUpdateTopControls(); |
| 110 } | 111 } |
| 111 | 112 |
| 112 } // namespace blink | 113 } // namespace blink |
| OLD | NEW |