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

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

Issue 2189073003: Add configuration_changed event and set_background_opacity request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 4 years, 4 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 | « no previous file | 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void Close(); 140 void Close();
141 141
142 // Set geometry for surface. The geometry represents the "visible bounds" 142 // Set geometry for surface. The geometry represents the "visible bounds"
143 // for the surface from the user's perspective. 143 // for the surface from the user's perspective.
144 void SetGeometry(const gfx::Rect& geometry); 144 void SetGeometry(const gfx::Rect& geometry);
145 145
146 // Set the content bounds for the shadow. Empty bounds will delete 146 // Set the content bounds for the shadow. Empty bounds will delete
147 // the shadow. 147 // the shadow.
148 void SetRectangularShadow(const gfx::Rect& content_bounds); 148 void SetRectangularShadow(const gfx::Rect& content_bounds);
149 149
150 // Set the pacity of the background for the window that has a shadow.
151 void SetRectangularShadowBackgroundOpacity(float opacity);
152
150 // Set scale factor for surface. The scale factor will be applied to surface 153 // Set scale factor for surface. The scale factor will be applied to surface
151 // and all descendants. 154 // and all descendants.
152 void SetScale(double scale); 155 void SetScale(double scale);
153 156
154 // Set top inset for surface. 157 // Set top inset for surface.
155 void SetTopInset(int height); 158 void SetTopInset(int height);
156 159
157 // Sets the main surface for the window. 160 // Sets the main surface for the window.
158 static void SetMainSurface(aura::Window* window, Surface* surface); 161 static void SetMainSurface(aura::Window* window, Surface* surface);
159 162
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 aura::Window* gained_active, 209 aura::Window* gained_active,
207 aura::Window* lost_active) override; 210 aura::Window* lost_active) override;
208 211
209 // Overridden from ui::EventHandler: 212 // Overridden from ui::EventHandler:
210 void OnKeyEvent(ui::KeyEvent* event) override; 213 void OnKeyEvent(ui::KeyEvent* event) override;
211 void OnMouseEvent(ui::MouseEvent* event) override; 214 void OnMouseEvent(ui::MouseEvent* event) override;
212 215
213 // Overridden from ui::AcceleratorTarget: 216 // Overridden from ui::AcceleratorTarget:
214 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 217 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
215 218
219 const aura::Window* shadow_underlay_for_test() const {
220 return shadow_underlay_;
221 }
222
216 private: 223 private:
217 class ScopedConfigure; 224 class ScopedConfigure;
218 class ScopedAnimationsDisabled; 225 class ScopedAnimationsDisabled;
219 226
220 // Surface state associated with each configure request. 227 // Surface state associated with each configure request.
221 struct Config { 228 struct Config {
222 uint32_t serial; 229 uint32_t serial;
223 gfx::Vector2d origin_offset; 230 gfx::Vector2d origin_offset;
224 int resize_component; 231 int resize_component;
225 }; 232 };
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 int resize_component_ = HTCAPTION; // HT constant (see ui/base/hit_test.h) 288 int resize_component_ = HTCAPTION; // HT constant (see ui/base/hit_test.h)
282 int pending_resize_component_ = HTCAPTION; 289 int pending_resize_component_ = HTCAPTION;
283 aura::Window* shadow_overlay_ = nullptr; 290 aura::Window* shadow_overlay_ = nullptr;
284 aura::Window* shadow_underlay_ = nullptr; 291 aura::Window* shadow_underlay_ = nullptr;
285 gfx::Rect shadow_content_bounds_; 292 gfx::Rect shadow_content_bounds_;
286 std::deque<Config> pending_configs_; 293 std::deque<Config> pending_configs_;
287 std::unique_ptr<ash::WindowResizer> resizer_; 294 std::unique_ptr<ash::WindowResizer> resizer_;
288 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_; 295 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_;
289 int top_inset_height_ = 0; 296 int top_inset_height_ = 0;
290 int pending_top_inset_height_ = 0; 297 int pending_top_inset_height_ = 0;
298 float rectangular_shadow_background_opacity_ = 1.0;
291 299
292 DISALLOW_COPY_AND_ASSIGN(ShellSurface); 300 DISALLOW_COPY_AND_ASSIGN(ShellSurface);
293 }; 301 };
294 302
295 } // namespace exo 303 } // namespace exo
296 304
297 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ 305 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_
OLDNEW
« no previous file with comments | « no previous file | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698