blob: b05628141b841a75aee2553438e42d5bebd0dc78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright 2016 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 CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_CLIENT_AURA_H_
#define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_CLIENT_AURA_H_
#include "base/macros.h"
#include "content/browser/renderer_host/compositor_resize_lock.h"
#include "content/browser/renderer_host/delegated_frame_host.h"
#include "content/common/content_export.h"
namespace content {
class RenderWidgetHostViewAura;
// DelegatedFrameHostClient implementation for aura, not used in mus.
class CONTENT_EXPORT DelegatedFrameHostClientAura
: public DelegatedFrameHostClient,
public CompositorResizeLockClient {
public:
explicit DelegatedFrameHostClientAura(
RenderWidgetHostViewAura* render_widget_host_view);
~DelegatedFrameHostClientAura() override;
protected:
RenderWidgetHostViewAura* render_widget_host_view() {
return render_widget_host_view_;
}
// DelegatedFrameHostClient implementation.
ui::Layer* DelegatedFrameHostGetLayer() const override;
bool DelegatedFrameHostIsVisible() const override;
SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override;
gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override;
bool DelegatedFrameCanCreateResizeLock() const override;
std::unique_ptr<CompositorResizeLock> DelegatedFrameHostCreateResizeLock()
override;
void OnBeginFrame() override;
bool IsAutoResizeEnabled() const override;
// CompositorResizeLockClient implementation.
std::unique_ptr<ui::CompositorLock> GetCompositorLock(
ui::CompositorLockClient* client) override;
void CompositorResizeLockEnded() override;
private:
RenderWidgetHostViewAura* render_widget_host_view_;
DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostClientAura);
};
} // namespace content
#endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_CLIENT_AURA_H_
|