blob: 8cbd0d3462e260803caca02a7336596961415b9d [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef EmbeddedContentView_h
#define EmbeddedContentView_h
#include "core/CoreExport.h"
#include "core/paint/PaintPhase.h"
#include "platform/heap/Handle.h"
namespace blink {
class CullRect;
class GraphicsContext;
class IntRect;
// EmbeddedContentView is a pure virtual class which is implemented by
// LocalFrameView, RemoteFrameView, and WebPluginContainerImpl.
class CORE_EXPORT EmbeddedContentView : public GarbageCollectedMixin {
public:
virtual ~EmbeddedContentView() = default;
virtual bool IsLocalFrameView() const { return false; }
virtual bool IsPluginView() const { return false; }
virtual void AttachToLayout() = 0;
virtual void DetachFromLayout() = 0;
virtual bool IsAttached() const = 0;
virtual void SetParentVisible(bool) = 0;
virtual void SetFrameRect(const IntRect&) = 0;
virtual void FrameRectsChanged() = 0;
virtual const IntRect& FrameRect() const = 0;
virtual void Paint(GraphicsContext&,
const GlobalPaintFlags,
const CullRect&) const = 0;
// Called when the size of the view changes. Implementations of
// EmbeddedContentView should call LayoutEmbeddedContent::UpdateGeometry in
// addition to any internal logic.
virtual void UpdateGeometry() = 0;
virtual void Show() = 0;
virtual void Hide() = 0;
virtual void Dispose() = 0;
};
} // namespace blink
#endif // EmbeddedContentView_h