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

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

Issue 2887103002: Revert of Refactor backdrop (Closed)
Patch Set: 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,
52 public WMHelper::DisplayConfigurationObserver { 53 public WMHelper::DisplayConfigurationObserver {
53 public: 54 public:
54 enum class BoundsMode { SHELL, CLIENT, FIXED }; 55 enum class BoundsMode { SHELL, CLIENT, FIXED };
55 56
56 // The |origin| is in screen coordinates. When bounds are controlled by the 57 // The |origin| is in screen coordinates. When bounds are controlled by the
57 // shell or fixed, it determines the initial position of the shell surface. 58 // shell or fixed, it determines the initial position of the shell surface.
58 // In that case, the position specified as part of the geometry is relative 59 // In that case, the position specified as part of the geometry is relative
59 // to the shell surface. 60 // to the shell surface.
60 // 61 //
61 // When bounds are controlled by the client, it represents the origin of a 62 // 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
255 void OnWindowBoundsChanged(aura::Window* window, 256 void OnWindowBoundsChanged(aura::Window* window,
256 const gfx::Rect& old_bounds, 257 const gfx::Rect& old_bounds,
257 const gfx::Rect& new_bounds) override; 258 const gfx::Rect& new_bounds) override;
258 void OnWindowDestroying(aura::Window* window) override; 259 void OnWindowDestroying(aura::Window* window) override;
259 260
260 // Overridden from WMHelper::ActivationObserver: 261 // Overridden from WMHelper::ActivationObserver:
261 void OnWindowActivated( 262 void OnWindowActivated(
262 aura::Window* gained_active, 263 aura::Window* gained_active,
263 aura::Window* lost_active) override; 264 aura::Window* lost_active) override;
264 265
266 // Overridden from WMHelper::AccessibilityObserver:
267 void OnAccessibilityModeChanged() override;
268
265 // Overridden from WMHelper::DisplayConfigurationObserver: 269 // Overridden from WMHelper::DisplayConfigurationObserver:
266 void OnDisplayConfigurationChanged() override; 270 void OnDisplayConfigurationChanged() override;
267 271
268 // Overridden from ui::EventHandler: 272 // Overridden from ui::EventHandler:
269 void OnKeyEvent(ui::KeyEvent* event) override; 273 void OnKeyEvent(ui::KeyEvent* event) override;
270 void OnMouseEvent(ui::MouseEvent* event) override; 274 void OnMouseEvent(ui::MouseEvent* event) override;
271 275
272 // Overridden from ui::AcceleratorTarget: 276 // Overridden from ui::AcceleratorTarget:
273 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 277 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
274 278
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 ConfigureCallback configure_callback_; 360 ConfigureCallback configure_callback_;
357 ScopedConfigure* scoped_configure_ = nullptr; 361 ScopedConfigure* scoped_configure_ = nullptr;
358 bool ignore_window_bounds_changes_ = false; 362 bool ignore_window_bounds_changes_ = false;
359 gfx::Vector2d origin_offset_; 363 gfx::Vector2d origin_offset_;
360 gfx::Vector2d pending_origin_offset_; 364 gfx::Vector2d pending_origin_offset_;
361 gfx::Vector2d pending_origin_offset_accumulator_; 365 gfx::Vector2d pending_origin_offset_accumulator_;
362 int resize_component_ = HTCAPTION; // HT constant (see ui/base/hit_test.h) 366 int resize_component_ = HTCAPTION; // HT constant (see ui/base/hit_test.h)
363 int pending_resize_component_ = HTCAPTION; 367 int pending_resize_component_ = HTCAPTION;
364 std::unique_ptr<aura::Window> shadow_overlay_; 368 std::unique_ptr<aura::Window> shadow_overlay_;
365 std::unique_ptr<aura::Window> shadow_underlay_; 369 std::unique_ptr<aura::Window> shadow_underlay_;
370 std::unique_ptr<ui::EventHandler> shadow_underlay_event_handler_;
366 gfx::Rect shadow_content_bounds_; 371 gfx::Rect shadow_content_bounds_;
367 float shadow_background_opacity_ = 1.0; 372 float shadow_background_opacity_ = 1.0;
368 std::deque<Config> pending_configs_; 373 std::deque<Config> pending_configs_;
369 std::unique_ptr<ash::WindowResizer> resizer_; 374 std::unique_ptr<ash::WindowResizer> resizer_;
370 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_; 375 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_;
371 int top_inset_height_ = 0; 376 int top_inset_height_ = 0;
372 int pending_top_inset_height_ = 0; 377 int pending_top_inset_height_ = 0;
373 bool shadow_underlay_in_surface_ = true; 378 bool shadow_underlay_in_surface_ = true;
374 bool pending_shadow_underlay_in_surface_ = true; 379 bool pending_shadow_underlay_in_surface_ = true;
375 bool system_modal_ = false; 380 bool system_modal_ = false;
376 381
377 DISALLOW_COPY_AND_ASSIGN(ShellSurface); 382 DISALLOW_COPY_AND_ASSIGN(ShellSurface);
378 }; 383 };
379 384
380 } // namespace exo 385 } // namespace exo
381 386
382 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ 387 #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