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

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

Issue 1884043002: Use black for resize gutter in tab fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 class RenderWidgetHostImpl; 48 class RenderWidgetHostImpl;
49 class ResizeLock; 49 class ResizeLock;
50 50
51 // The DelegatedFrameHostClient is the interface from the DelegatedFrameHost, 51 // The DelegatedFrameHostClient is the interface from the DelegatedFrameHost,
52 // which manages delegated frames, and the ui::Compositor being used to 52 // which manages delegated frames, and the ui::Compositor being used to
53 // display them. 53 // display them.
54 class CONTENT_EXPORT DelegatedFrameHostClient { 54 class CONTENT_EXPORT DelegatedFrameHostClient {
55 public: 55 public:
56 virtual ui::Layer* DelegatedFrameHostGetLayer() const = 0; 56 virtual ui::Layer* DelegatedFrameHostGetLayer() const = 0;
57 virtual bool DelegatedFrameHostIsVisible() const = 0; 57 virtual bool DelegatedFrameHostIsVisible() const = 0;
58
59 // The callee can change the value of *color to modify what color the resize
60 // gutters are drawn with.
61 virtual void DelegatedFrameHostOverrideGutterColor(SkColor* color) const = 0;
58 virtual gfx::Size DelegatedFrameHostDesiredSizeInDIP() const = 0; 62 virtual gfx::Size DelegatedFrameHostDesiredSizeInDIP() const = 0;
59 63
60 virtual bool DelegatedFrameCanCreateResizeLock() const = 0; 64 virtual bool DelegatedFrameCanCreateResizeLock() const = 0;
61 virtual std::unique_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock( 65 virtual std::unique_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock(
62 bool defer_compositor_lock) = 0; 66 bool defer_compositor_lock) = 0;
63 virtual void DelegatedFrameHostResizeLockWasReleased() = 0; 67 virtual void DelegatedFrameHostResizeLockWasReleased() = 0;
64 68
65 virtual void DelegatedFrameHostSendCompositorSwapAck( 69 virtual void DelegatedFrameHostSendCompositorSwapAck(
66 int output_surface_id, 70 int output_surface_id,
67 const cc::CompositorFrameAck& ack) = 0; 71 const cc::CompositorFrameAck& ack) = 0;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 200
197 bool ShouldSkipFrame(gfx::Size size_in_dip) const; 201 bool ShouldSkipFrame(gfx::Size size_in_dip) const;
198 202
199 // Lazily grab a resize lock if the aura window size doesn't match the current 203 // Lazily grab a resize lock if the aura window size doesn't match the current
200 // frame size, to give time to the renderer. 204 // frame size, to give time to the renderer.
201 void MaybeCreateResizeLock(); 205 void MaybeCreateResizeLock();
202 206
203 // Checks if the resize lock can be released because we received an new frame. 207 // Checks if the resize lock can be released because we received an new frame.
204 void CheckResizeLock(); 208 void CheckResizeLock();
205 209
210 SkColor GetGutterColor() const;
211
206 // Update the layers for the resize gutters to the right and bottom of the 212 // Update the layers for the resize gutters to the right and bottom of the
207 // surface layer. 213 // surface layer.
208 void UpdateGutters(); 214 void UpdateGutters();
209 215
210 // Called after async thumbnailer task completes. Scales and crops the result 216 // Called after async thumbnailer task completes. Scales and crops the result
211 // of the copy. 217 // of the copy.
212 static void CopyFromCompositingSurfaceHasResultForVideo( 218 static void CopyFromCompositingSurfaceHasResultForVideo(
213 base::WeakPtr<DelegatedFrameHost> rwhva, 219 base::WeakPtr<DelegatedFrameHost> rwhva,
214 scoped_refptr<OwnedMailbox> subscriber_texture, 220 scoped_refptr<OwnedMailbox> subscriber_texture,
215 scoped_refptr<media::VideoFrame> video_frame, 221 scoped_refptr<media::VideoFrame> video_frame,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 std::unique_ptr<content::ReadbackYUVInterface> yuv_readback_pipeline_; 323 std::unique_ptr<content::ReadbackYUVInterface> yuv_readback_pipeline_;
318 324
319 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 325 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
320 326
321 cc::BeginFrameSource* begin_frame_source_; 327 cc::BeginFrameSource* begin_frame_source_;
322 }; 328 };
323 329
324 } // namespace content 330 } // namespace content
325 331
326 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 332 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698