| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 using blink::WebLayerTreeView; | 61 using blink::WebLayerTreeView; |
| 62 using blink::WebScrollbar; | 62 using blink::WebScrollbar; |
| 63 using blink::WebScrollbarLayer; | 63 using blink::WebScrollbarLayer; |
| 64 using blink::FrameHost; | 64 using blink::FrameHost; |
| 65 using blink::GraphicsLayer; | 65 using blink::GraphicsLayer; |
| 66 using blink::GraphicsLayerFactory; | 66 using blink::GraphicsLayerFactory; |
| 67 | 67 |
| 68 namespace blink { | 68 namespace blink { |
| 69 | 69 |
| 70 PinchViewport::PinchViewport(FrameHost& owner) | 70 PinchViewport::PinchViewport(FrameHost& owner) |
| 71 : m_frameHost(owner) | 71 : m_frameHost(&owner) |
| 72 , m_scale(1) | 72 , m_scale(1) |
| 73 , m_topControlsAdjustment(0) | 73 , m_topControlsAdjustment(0) |
| 74 { | 74 { |
| 75 reset(); | 75 reset(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 PinchViewport::~PinchViewport() | 78 PinchViewport::~PinchViewport() |
| 79 { | 79 { |
| 80 } | 80 } |
| 81 | 81 |
| 82 DEFINE_TRACE(PinchViewport) |
| 83 { |
| 84 visitor->trace(m_frameHost); |
| 85 ScrollableArea::trace(visitor); |
| 86 } |
| 87 |
| 82 void PinchViewport::setSize(const IntSize& size) | 88 void PinchViewport::setSize(const IntSize& size) |
| 83 { | 89 { |
| 84 // When the main frame is remote, we won't have an associated frame. | 90 // When the main frame is remote, we won't have an associated frame. |
| 85 if (!mainFrame()) | 91 if (!mainFrame()) |
| 86 return; | 92 return; |
| 87 | 93 |
| 88 if (m_size == size) | 94 if (m_size == size) |
| 89 return; | 95 return; |
| 90 | 96 |
| 91 bool autosizerNeedsUpdating = | 97 bool autosizerNeedsUpdating = |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 } else if (graphicsLayer == m_rootTransformLayer) { | 659 } else if (graphicsLayer == m_rootTransformLayer) { |
| 654 name = "Root Transform Layer"; | 660 name = "Root Transform Layer"; |
| 655 } else { | 661 } else { |
| 656 ASSERT_NOT_REACHED(); | 662 ASSERT_NOT_REACHED(); |
| 657 } | 663 } |
| 658 | 664 |
| 659 return name; | 665 return name; |
| 660 } | 666 } |
| 661 | 667 |
| 662 } // namespace blink | 668 } // namespace blink |
| OLD | NEW |