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

Side by Side Diff: third_party/WebKit/Source/core/paint/EmbeddedObjectPaintInvalidator.cpp

Issue 2764313002: Move plugins to be stored in HTMLPlugInElement. (Closed)
Patch Set: Update comments about duplicating code Created 3 years, 8 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
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698