| OLD | NEW |
| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // Overridden from WMHelper::AccessibilityObserver: | 258 // Overridden from WMHelper::AccessibilityObserver: |
| 259 void OnAccessibilityModeChanged() override; | 259 void OnAccessibilityModeChanged() override; |
| 260 | 260 |
| 261 // Overridden from ui::EventHandler: | 261 // Overridden from ui::EventHandler: |
| 262 void OnKeyEvent(ui::KeyEvent* event) override; | 262 void OnKeyEvent(ui::KeyEvent* event) override; |
| 263 void OnMouseEvent(ui::MouseEvent* event) override; | 263 void OnMouseEvent(ui::MouseEvent* event) override; |
| 264 | 264 |
| 265 // Overridden from ui::AcceleratorTarget: | 265 // Overridden from ui::AcceleratorTarget: |
| 266 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 266 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 267 | 267 |
| 268 aura::Window* shadow_overlay() { return shadow_overlay_; } | 268 aura::Window* shadow_overlay() { return shadow_overlay_.get(); } |
| 269 aura::Window* shadow_underlay() { return shadow_underlay_; } | 269 aura::Window* shadow_underlay() { return shadow_underlay_.get(); } |
| 270 | 270 |
| 271 Surface* surface_for_testing() { return surface_; } | 271 Surface* surface_for_testing() { return surface_; } |
| 272 | 272 |
| 273 private: | 273 private: |
| 274 class ScopedConfigure; | 274 class ScopedConfigure; |
| 275 class ScopedAnimationsDisabled; | 275 class ScopedAnimationsDisabled; |
| 276 | 276 |
| 277 // Surface state associated with each configure request. | 277 // Surface state associated with each configure request. |
| 278 struct Config { | 278 struct Config { |
| 279 uint32_t serial; | 279 uint32_t serial; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 base::Closure surface_destroyed_callback_; | 340 base::Closure surface_destroyed_callback_; |
| 341 StateChangedCallback state_changed_callback_; | 341 StateChangedCallback state_changed_callback_; |
| 342 ConfigureCallback configure_callback_; | 342 ConfigureCallback configure_callback_; |
| 343 ScopedConfigure* scoped_configure_ = nullptr; | 343 ScopedConfigure* scoped_configure_ = nullptr; |
| 344 bool ignore_window_bounds_changes_ = false; | 344 bool ignore_window_bounds_changes_ = false; |
| 345 gfx::Vector2d origin_offset_; | 345 gfx::Vector2d origin_offset_; |
| 346 gfx::Vector2d pending_origin_offset_; | 346 gfx::Vector2d pending_origin_offset_; |
| 347 gfx::Vector2d pending_origin_offset_accumulator_; | 347 gfx::Vector2d pending_origin_offset_accumulator_; |
| 348 int resize_component_ = HTCAPTION; // HT constant (see ui/base/hit_test.h) | 348 int resize_component_ = HTCAPTION; // HT constant (see ui/base/hit_test.h) |
| 349 int pending_resize_component_ = HTCAPTION; | 349 int pending_resize_component_ = HTCAPTION; |
| 350 aura::Window* shadow_overlay_ = nullptr; | 350 std::unique_ptr<aura::Window> shadow_overlay_; |
| 351 aura::Window* shadow_underlay_ = nullptr; | 351 std::unique_ptr<aura::Window> shadow_underlay_; |
| 352 std::unique_ptr<ui::EventHandler> shadow_underlay_event_handler_; | 352 std::unique_ptr<ui::EventHandler> shadow_underlay_event_handler_; |
| 353 gfx::Rect shadow_content_bounds_; | 353 gfx::Rect shadow_content_bounds_; |
| 354 float shadow_background_opacity_ = 1.0; | 354 float shadow_background_opacity_ = 1.0; |
| 355 std::deque<Config> pending_configs_; | 355 std::deque<Config> pending_configs_; |
| 356 std::unique_ptr<ash::WindowResizer> resizer_; | 356 std::unique_ptr<ash::WindowResizer> resizer_; |
| 357 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_; | 357 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_; |
| 358 int top_inset_height_ = 0; | 358 int top_inset_height_ = 0; |
| 359 int pending_top_inset_height_ = 0; | 359 int pending_top_inset_height_ = 0; |
| 360 bool shadow_underlay_in_surface_ = true; | 360 bool shadow_underlay_in_surface_ = true; |
| 361 bool pending_shadow_underlay_in_surface_ = true; |
| 361 bool system_modal_ = false; | 362 bool system_modal_ = false; |
| 362 | 363 |
| 363 DISALLOW_COPY_AND_ASSIGN(ShellSurface); | 364 DISALLOW_COPY_AND_ASSIGN(ShellSurface); |
| 364 }; | 365 }; |
| 365 | 366 |
| 366 } // namespace exo | 367 } // namespace exo |
| 367 | 368 |
| 368 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ | 369 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ |
| OLD | NEW |