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

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

Issue 2890733005: Refactor backdrop that is currently used in the maximized mode. (Closed)
Patch Set: fix memory issue in AshTouchExplorationManager Created 3 years, 7 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/BUILD.gn ('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 <cstdint> 8 #include <cstdint>
9 #include <deque> 9 #include <deque>
10 #include <memory> 10 #include <memory>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // This class provides functions for treating a surfaces like toplevel, 42 // This class provides functions for treating a surfaces like toplevel,
43 // fullscreen or popup widgets, move, resize or maximize them, associate 43 // fullscreen or popup widgets, move, resize or maximize them, associate
44 // metadata like title and class, etc. 44 // metadata like title and class, etc.
45 class ShellSurface : public SurfaceDelegate, 45 class ShellSurface : public SurfaceDelegate,
46 public SurfaceObserver, 46 public SurfaceObserver,
47 public views::WidgetDelegate, 47 public views::WidgetDelegate,
48 public views::View, 48 public views::View,
49 public ash::wm::WindowStateObserver, 49 public ash::wm::WindowStateObserver,
50 public aura::WindowObserver, 50 public aura::WindowObserver,
51 public WMHelper::ActivationObserver, 51 public WMHelper::ActivationObserver,
52 public WMHelper::AccessibilityObserver,
53 public WMHelper::DisplayConfigurationObserver { 52 public WMHelper::DisplayConfigurationObserver {
54 public: 53 public:
55 enum class BoundsMode { SHELL, CLIENT, FIXED }; 54 enum class BoundsMode { SHELL, CLIENT, FIXED };
56 55
57 // The |origin| is in screen coordinates. When bounds are controlled by the 56 // The |origin| is in screen coordinates. When bounds are controlled by the
58 // shell or fixed, it determines the initial position of the shell surface. 57 // shell or fixed, it determines the initial position of the shell surface.
59 // In that case, the position specified as part of the geometry is relative 58 // In that case, the position specified as part of the geometry is relative
60 // to the shell surface. 59 // to the shell surface.
61 // 60 //
62 // When bounds are controlled by the client, it represents the origin of a 61 // When bounds are controlled by the client, it represents the origin of a
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 void OnWindowBoundsChanged(aura::Window* window, 255 void OnWindowBoundsChanged(aura::Window* window,
257 const gfx::Rect& old_bounds, 256 const gfx::Rect& old_bounds,
258 const gfx::Rect& new_bounds) override; 257 const gfx::Rect& new_bounds) override;
259 void OnWindowDestroying(aura::Window* window) override; 258 void OnWindowDestroying(aura::Window* window) override;
260 259
261 // Overridden from WMHelper::ActivationObserver: 260 // Overridden from WMHelper::ActivationObserver:
262 void OnWindowActivated( 261 void OnWindowActivated(
263 aura::Window* gained_active, 262 aura::Window* gained_active,
264 aura::Window* lost_active) override; 263 aura::Window* lost_active) override;
265 264
266 // Overridden from WMHelper::AccessibilityObserver:
267 void OnAccessibilityModeChanged() override;
268
269 // Overridden from WMHelper::DisplayConfigurationObserver: 265 // Overridden from WMHelper::DisplayConfigurationObserver:
270 void OnDisplayConfigurationChanged() override; 266 void OnDisplayConfigurationChanged() override;
271 267
272 // Overridden from ui::EventHandler: 268 // Overridden from ui::EventHandler:
273 void OnKeyEvent(ui::KeyEvent* event) override; 269 void OnKeyEvent(ui::KeyEvent* event) override;
274 void OnMouseEvent(ui::MouseEvent* event) override; 270 void OnMouseEvent(ui::MouseEvent* event) override;
275 271
276 // Overridden from ui::AcceleratorTarget: 272 // Overridden from ui::AcceleratorTarget:
277 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 273 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
278 274
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 ConfigureCallback configure_callback_; 356 ConfigureCallback configure_callback_;
361 ScopedConfigure* scoped_configure_ = nullptr; 357 ScopedConfigure* scoped_configure_ = nullptr;
362 bool ignore_window_bounds_changes_ = false; 358 bool ignore_window_bounds_changes_ = false;
363 gfx::Vector2d origin_offset_; 359 gfx::Vector2d origin_offset_;
364 gfx::Vector2d pending_origin_offset_; 360 gfx::Vector2d pending_origin_offset_;
365 gfx::Vector2d pending_origin_offset_accumulator_; 361 gfx::Vector2d pending_origin_offset_accumulator_;
366 int resize_component_ = HTCAPTION; // HT constant (see ui/base/hit_test.h) 362 int resize_component_ = HTCAPTION; // HT constant (see ui/base/hit_test.h)
367 int pending_resize_component_ = HTCAPTION; 363 int pending_resize_component_ = HTCAPTION;
368 std::unique_ptr<aura::Window> shadow_overlay_; 364 std::unique_ptr<aura::Window> shadow_overlay_;
369 std::unique_ptr<aura::Window> shadow_underlay_; 365 std::unique_ptr<aura::Window> shadow_underlay_;
370 std::unique_ptr<ui::EventHandler> shadow_underlay_event_handler_;
371 gfx::Rect shadow_content_bounds_; 366 gfx::Rect shadow_content_bounds_;
372 float shadow_background_opacity_ = 1.0; 367 float shadow_background_opacity_ = 1.0;
373 std::deque<Config> pending_configs_; 368 std::deque<Config> pending_configs_;
374 std::unique_ptr<ash::WindowResizer> resizer_; 369 std::unique_ptr<ash::WindowResizer> resizer_;
375 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_; 370 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_;
376 int top_inset_height_ = 0; 371 int top_inset_height_ = 0;
377 int pending_top_inset_height_ = 0; 372 int pending_top_inset_height_ = 0;
378 bool shadow_underlay_in_surface_ = true; 373 bool shadow_underlay_in_surface_ = true;
379 bool pending_shadow_underlay_in_surface_ = true; 374 bool pending_shadow_underlay_in_surface_ = true;
380 bool system_modal_ = false; 375 bool system_modal_ = false;
381 376
382 DISALLOW_COPY_AND_ASSIGN(ShellSurface); 377 DISALLOW_COPY_AND_ASSIGN(ShellSurface);
383 }; 378 };
384 379
385 } // namespace exo 380 } // namespace exo
386 381
387 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ 382 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_
OLDNEW
« no previous file with comments | « components/exo/BUILD.gn ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698