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

Unified Diff: components/exo/shell_surface.h

Issue 1580033004: exo: Improve Maximize and Fullscreen support for ShellSurfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO Created 4 years, 11 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 | « components/exo/pointer_unittest.cc ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface.h
diff --git a/components/exo/shell_surface.h b/components/exo/shell_surface.h
index 2d8702e43b320a399bd17ed33fcfe8676a60c837..f9f29d8e4aeddd8f3ef888b850378352c84208d4 100644
--- a/components/exo/shell_surface.h
+++ b/components/exo/shell_surface.h
@@ -46,14 +46,23 @@ class ShellSurface : public SurfaceDelegate,
surface_destroyed_callback_ = surface_destroyed_callback;
}
- // Show surface as a toplevel window.
- void SetToplevel();
+ // Set the callback to run when the client is asked to resize the surface.
+ // The size is a hint, in the sense that the client is free to ignore it if
+ // it doesn't resize, pick a smaller size (to satisfy aspect ratio or resize
+ // in steps of NxM pixels).
+ using ConfigureCallback = base::Callback<void(const gfx::Size& size)>;
+ void set_configure_callback(const ConfigureCallback& configure_callback) {
+ configure_callback_ = configure_callback;
+ }
+
+ // Initialize shell surface as a toplevel window.
+ void Init();
- // Maximize or show surface as a maximized window.
- void SetMaximized();
+ // Maximizes the shell surface.
+ void Maximize();
- // Fullscreen or show surface as a fullscreen window.
- void SetFullscreen();
+ // Set fullscreen state for shell surface.
+ void SetFullscreen(bool fullscreen);
// Set title for surface.
void SetTitle(const base::string16& title);
@@ -107,6 +116,7 @@ class ShellSurface : public SurfaceDelegate,
gfx::Rect geometry_;
base::Closure close_callback_;
base::Closure surface_destroyed_callback_;
+ ConfigureCallback configure_callback_;
DISALLOW_COPY_AND_ASSIGN(ShellSurface);
};
« no previous file with comments | « components/exo/pointer_unittest.cc ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698