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

Unified Diff: components/exo/shell_surface.h

Issue 2040743002: exo: Implement version 2 of remote shell interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-shell-version-2
Patch Set: popup placement fix Created 4 years, 6 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
Index: components/exo/shell_surface.h
diff --git a/components/exo/shell_surface.h b/components/exo/shell_surface.h
index b34a9ef5ea74c04d1c24f74ffe4439b0357c5baf..cca6175adaf3fa92449bd521c03bb26abf74fd0a 100644
--- a/components/exo/shell_surface.h
+++ b/components/exo/shell_surface.h
@@ -49,7 +49,6 @@ class ShellSurface : public SurfaceDelegate,
ShellSurface* parent,
const gfx::Rect& initial_bounds,
bool activatable,
- bool resizeable,
int container);
explicit ShellSurface(Surface* surface);
~ShellSurface() override;
@@ -66,6 +65,15 @@ class ShellSurface : public SurfaceDelegate,
surface_destroyed_callback_ = surface_destroyed_callback;
}
+ // Set the callback to run when the surface state changed.
+ using StateChangedCallback =
+ base::Callback<void(ash::wm::WindowStateType old_state_type,
+ ash::wm::WindowStateType new_state_type)>;
+ void set_state_changed_callback(
+ const StateChangedCallback& state_changed_callback) {
+ state_changed_callback_ = state_changed_callback;
+ }
+
// Set the callback to run when the client is asked to configure 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
@@ -91,6 +99,9 @@ class ShellSurface : public SurfaceDelegate,
// Maximizes the shell surface.
void Maximize();
+ // Minimize the shell surface.
+ void Minimize();
+
// Restore the shell surface.
void Restore();
@@ -144,8 +155,9 @@ class ShellSurface : public SurfaceDelegate,
void OnSurfaceDestroying(Surface* surface) override;
// Overridden from views::WidgetDelegate:
- bool CanMaximize() const override;
bool CanResize() const override;
+ bool CanMaximize() const override;
+ bool CanMinimize() const override;
base::string16 GetWindowTitle() const override;
void WindowClosing() override;
views::Widget* GetWidget() override;
@@ -221,9 +233,9 @@ class ShellSurface : public SurfaceDelegate,
aura::Window* parent_;
const gfx::Rect initial_bounds_;
const bool activatable_;
- const bool resizeable_;
// Container Window Id (see ash/common/shell_window_ids.h)
const int container_;
+ bool pending_show_widget_;
base::string16 title_;
std::string application_id_;
gfx::Rect geometry_;
@@ -232,6 +244,7 @@ class ShellSurface : public SurfaceDelegate,
double pending_scale_;
base::Closure close_callback_;
base::Closure surface_destroyed_callback_;
+ StateChangedCallback state_changed_callback_;
ConfigureCallback configure_callback_;
ScopedConfigure* scoped_configure_;
bool ignore_window_bounds_changes_;

Powered by Google App Engine
This is Rietveld 408576698