OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/paint/EmbeddedObjectPaintInvalidator.h" | 5 #include "core/paint/EmbeddedObjectPaintInvalidator.h" |
6 | 6 |
7 #include "core/layout/LayoutEmbeddedObject.h" | 7 #include "core/layout/LayoutEmbeddedObject.h" |
8 #include "core/paint/BoxPaintInvalidator.h" | 8 #include "core/paint/BoxPaintInvalidator.h" |
9 #include "core/plugins/PluginView.h" | 9 #include "core/plugins/PluginView.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 PaintInvalidationReason | 13 PaintInvalidationReason |
14 EmbeddedObjectPaintInvalidator::invalidatePaintIfNeeded() { | 14 EmbeddedObjectPaintInvalidator::invalidatePaintIfNeeded() { |
15 PaintInvalidationReason reason = | 15 PaintInvalidationReason reason = |
16 BoxPaintInvalidator(m_embeddedObject, m_context) | 16 BoxPaintInvalidator(m_embeddedObject, m_context) |
17 .invalidatePaintIfNeeded(); | 17 .invalidatePaintIfNeeded(); |
18 | 18 |
19 FrameViewBase* frameViewBase = m_embeddedObject.frameViewBase(); | 19 PluginView* plugin = m_embeddedObject.plugin(); |
20 if (frameViewBase && frameViewBase->isPluginView()) | 20 if (plugin) |
21 toPluginView(frameViewBase)->invalidatePaintIfNeeded(); | 21 plugin->invalidatePaintIfNeeded(); |
22 | 22 |
23 return reason; | 23 return reason; |
24 } | 24 } |
25 | 25 |
26 } // namespace blink | 26 } // namespace blink |
OLD | NEW |