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

Unified Diff: ui/aura/mus/client_surface_embedder.h

Issue 2797263002: Aura-Mus: Implement gutter in the embedder. (Closed)
Patch Set: Addressed sadrul's comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/aura/mus/client_surface_embedder.cc » ('j') | ui/aura/mus/client_surface_embedder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/client_surface_embedder.h
diff --git a/ui/aura/mus/client_surface_embedder.h b/ui/aura/mus/client_surface_embedder.h
index 58d0bf911920e4300ad3cb7c27e60aa622393674..c469789d1bded62da496fd587e033951dff816c7 100644
--- a/ui/aura/mus/client_surface_embedder.h
+++ b/ui/aura/mus/client_surface_embedder.h
@@ -5,11 +5,16 @@
#include <memory>
#include "base/macros.h"
+#include "ui/gfx/geometry/insets.h"
namespace cc {
class SurfaceInfo;
}
+namespace gfx {
+class Insets;
+}
+
namespace ui {
class Layer;
}
@@ -23,7 +28,9 @@ class Window;
// layer, and updating them when the client submits new surfaces.
class ClientSurfaceEmbedder {
public:
- explicit ClientSurfaceEmbedder(Window* window);
+ // TODO(fsamuel): Insets might differ when the window is maximized. We should
+ // deal with that case as well.
+ ClientSurfaceEmbedder(Window* window, const gfx::Insets& client_area_insets);
~ClientSurfaceEmbedder();
// Updates the clip layer and primary SurfaceInfo of the surface layer based
@@ -34,6 +41,14 @@ class ClientSurfaceEmbedder {
// updated.
void SetFallbackSurfaceInfo(const cc::SurfaceInfo& surface_info);
+ // Update the surface layer size and the right and bottom gutter layers for
+ // the current window size.
+ void UpdateSizeAndGutters();
+
+ ui::Layer* RightGutterForTesting() { return right_gutter_.get(); }
+
+ ui::Layer* BottomGutterForTesting() { return bottom_gutter_.get(); }
+
private:
// The window which embeds the client.
Window* window_;
@@ -41,8 +56,11 @@ class ClientSurfaceEmbedder {
// Contains the client's content.
std::unique_ptr<ui::Layer> surface_layer_;
- // Used for clipping the surface layer to the window bounds.
- std::unique_ptr<ui::Layer> clip_layer_;
+ // Used for showing a gutter when the content is not available.
+ std::unique_ptr<ui::Layer> right_gutter_;
+ std::unique_ptr<ui::Layer> bottom_gutter_;
+
+ gfx::Insets client_area_insets_;
DISALLOW_COPY_AND_ASSIGN(ClientSurfaceEmbedder);
};
« no previous file with comments | « no previous file | ui/aura/mus/client_surface_embedder.cc » ('j') | ui/aura/mus/client_surface_embedder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698