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

Side by Side Diff: content/browser/renderer_host/delegated_frame_host_client_aura.h

Issue 2773433003: Fix CompositorResizeLock to do something. (Closed)
Patch Set: resizelock: observer-rebase 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_CLIENT_AURA_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_CLIENT_AURA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_CLIENT_AURA_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_CLIENT_AURA_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/browser/renderer_host/compositor_resize_lock.h"
9 #include "content/browser/renderer_host/delegated_frame_host.h" 10 #include "content/browser/renderer_host/delegated_frame_host.h"
10 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 class RenderWidgetHostViewAura; 15 class RenderWidgetHostViewAura;
15 16
16 // DelegatedFrameHostClient implementation for aura, not used in mus. 17 // DelegatedFrameHostClient implementation for aura, not used in mus.
17 class CONTENT_EXPORT DelegatedFrameHostClientAura 18 class CONTENT_EXPORT DelegatedFrameHostClientAura
18 : public DelegatedFrameHostClient { 19 : public DelegatedFrameHostClient,
20 NON_EXPORTED_BASE(public CompositorResizeLockClient) {
19 public: 21 public:
20 explicit DelegatedFrameHostClientAura( 22 explicit DelegatedFrameHostClientAura(
21 RenderWidgetHostViewAura* render_widget_host_view); 23 RenderWidgetHostViewAura* render_widget_host_view);
22 ~DelegatedFrameHostClientAura() override; 24 ~DelegatedFrameHostClientAura() override;
23 25
24 protected: 26 protected:
25 RenderWidgetHostViewAura* render_widget_host_view() { 27 RenderWidgetHostViewAura* render_widget_host_view() {
26 return render_widget_host_view_; 28 return render_widget_host_view_;
27 } 29 }
28 30
29 // DelegatedFrameHostClient implementation. 31 // DelegatedFrameHostClient implementation.
30 ui::Layer* DelegatedFrameHostGetLayer() const override; 32 ui::Layer* DelegatedFrameHostGetLayer() const override;
31 bool DelegatedFrameHostIsVisible() const override; 33 bool DelegatedFrameHostIsVisible() const override;
32 SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override; 34 SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override;
33 gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override; 35 gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override;
34 bool DelegatedFrameCanCreateResizeLock() const override; 36 bool DelegatedFrameCanCreateResizeLock() const override;
35 std::unique_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock( 37 std::unique_ptr<CompositorResizeLock> DelegatedFrameHostCreateResizeLock()
36 bool defer_compositor_lock) override; 38 override;
37 void DelegatedFrameHostResizeLockWasReleased() override; 39 void DelegatedFrameHostResizeLockWasReleased() override;
38 void DelegatedFrameHostSendReclaimCompositorResources( 40 void DelegatedFrameHostSendReclaimCompositorResources(
39 int compositor_frame_sink_id, 41 int compositor_frame_sink_id,
40 bool is_swap_ack, 42 bool is_swap_ack,
41 const cc::ReturnedResourceArray& resources) override; 43 const cc::ReturnedResourceArray& resources) override;
42 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 44 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
43 bool IsAutoResizeEnabled() const override; 45 bool IsAutoResizeEnabled() const override;
44 46
47 // CompositorResizeLockClient implementation.
48 std::unique_ptr<ui::CompositorLock> GetCompositorLock(
49 ui::CompositorLockClient* client) override;
50 void CompositorResizeLockEnded() override;
51
45 private: 52 private:
46 RenderWidgetHostViewAura* render_widget_host_view_; 53 RenderWidgetHostViewAura* render_widget_host_view_;
47 54
48 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostClientAura); 55 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostClientAura);
49 }; 56 };
50 57
51 } // namespace content 58 } // namespace content
52 59
53 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_CLIENT_AURA_H_ 60 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_CLIENT_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698