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

Side by Side Diff: components/exo/shell_surface.h

Issue 2706543002: exo: Synchronize multi-display window positioning (Closed)
Patch Set: Address nit Created 3 years, 9 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
« no previous file with comments | « components/exo/display_unittest.cc ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_EXO_SHELL_SURFACE_H_ 5 #ifndef COMPONENTS_EXO_SHELL_SURFACE_H_
6 #define COMPONENTS_EXO_SHELL_SURFACE_H_ 6 #define COMPONENTS_EXO_SHELL_SURFACE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public: 49 public:
50 enum class BoundsMode { SHELL, CLIENT, FIXED }; 50 enum class BoundsMode { SHELL, CLIENT, FIXED };
51 51
52 // The |origin| is in screen coordinates. When bounds are controlled by the 52 // The |origin| is in screen coordinates. When bounds are controlled by the
53 // shell or fixed, it determines the initial position of the shell surface. 53 // shell or fixed, it determines the initial position of the shell surface.
54 // In that case, the position specified as part of the geometry is relative 54 // In that case, the position specified as part of the geometry is relative
55 // to the shell surface. 55 // to the shell surface.
56 // 56 //
57 // When bounds are controlled by the client, it represents the origin of a 57 // When bounds are controlled by the client, it represents the origin of a
58 // coordinate system to which the position of the shell surface, specified 58 // coordinate system to which the position of the shell surface, specified
59 // as part of the geometry, is relative. 59 // as part of the geometry, is relative. The client must acknowledge changes
60 // to the origin, and offset the geometry accordingly.
60 ShellSurface(Surface* surface, 61 ShellSurface(Surface* surface,
61 ShellSurface* parent, 62 ShellSurface* parent,
62 BoundsMode bounds_mode, 63 BoundsMode bounds_mode,
63 const gfx::Point& origin, 64 const gfx::Point& origin,
64 bool activatable, 65 bool activatable,
65 bool can_minimize, 66 bool can_minimize,
66 int container); 67 int container);
67 explicit ShellSurface(Surface* surface); 68 explicit ShellSurface(Surface* surface);
68 ~ShellSurface() override; 69 ~ShellSurface() override;
69 70
(...skipping 19 matching lines...) Expand all
89 } 90 }
90 91
91 // Set the callback to run when the client is asked to configure the surface. 92 // Set the callback to run when the client is asked to configure the surface.
92 // The size is a hint, in the sense that the client is free to ignore it if 93 // The size is a hint, in the sense that the client is free to ignore it if
93 // it doesn't resize, pick a smaller size (to satisfy aspect ratio or resize 94 // it doesn't resize, pick a smaller size (to satisfy aspect ratio or resize
94 // in steps of NxM pixels). 95 // in steps of NxM pixels).
95 using ConfigureCallback = 96 using ConfigureCallback =
96 base::Callback<uint32_t(const gfx::Size& size, 97 base::Callback<uint32_t(const gfx::Size& size,
97 ash::wm::WindowStateType state_type, 98 ash::wm::WindowStateType state_type,
98 bool resizing, 99 bool resizing,
99 bool activated)>; 100 bool activated,
101 const gfx::Point& origin)>;
100 void set_configure_callback(const ConfigureCallback& configure_callback) { 102 void set_configure_callback(const ConfigureCallback& configure_callback) {
101 configure_callback_ = configure_callback; 103 configure_callback_ = configure_callback;
102 } 104 }
103 105
104 // When the client is asked to configure the surface, it should acknowledge 106 // When the client is asked to configure the surface, it should acknowledge
105 // the configure request sometime before the commit. |serial| is the serial 107 // the configure request sometime before the commit. |serial| is the serial
106 // from the configure callback. 108 // from the configure callback.
107 void AcknowledgeConfigure(uint32_t serial); 109 void AcknowledgeConfigure(uint32_t serial);
108 110
109 // Set the "parent" of this surface. This window should be stacked above a 111 // Set the "parent" of this surface. This window should be stacked above a
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 int top_inset_height_ = 0; 347 int top_inset_height_ = 0;
346 int pending_top_inset_height_ = 0; 348 int pending_top_inset_height_ = 0;
347 bool shadow_underlay_in_surface_ = true; 349 bool shadow_underlay_in_surface_ = true;
348 350
349 DISALLOW_COPY_AND_ASSIGN(ShellSurface); 351 DISALLOW_COPY_AND_ASSIGN(ShellSurface);
350 }; 352 };
351 353
352 } // namespace exo 354 } // namespace exo
353 355
354 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ 356 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_
OLDNEW
« no previous file with comments | « components/exo/display_unittest.cc ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698