OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_AURA_WINDOW_PORT_FOR_SHUTDOWN_H_ |
| 6 #define UI_AURA_WINDOW_PORT_FOR_SHUTDOWN_H_ |
| 7 |
| 8 #include "ui/aura/window_port.h" |
| 9 |
| 10 namespace aura { |
| 11 |
| 12 // When WindowTreeClient is destroyed any existing windows get a |
| 13 // WindowPortForShutdown assigned to them. This allows for the Window to keep |
| 14 // working without a WindowTreeClient. This class is *only* used inside aura. |
| 15 class WindowPortForShutdown : public WindowPort { |
| 16 public: |
| 17 WindowPortForShutdown(); |
| 18 ~WindowPortForShutdown() override; |
| 19 |
| 20 static void Install(aura::Window* window); |
| 21 |
| 22 // WindowPort: |
| 23 void OnPreInit(Window* window) override; |
| 24 void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
| 25 void OnWillAddChild(Window* child) override; |
| 26 void OnWillRemoveChild(Window* child) override; |
| 27 void OnWillMoveChild(size_t current_index, size_t dest_index) override; |
| 28 void OnVisibilityChanged(bool visible) override; |
| 29 void OnDidChangeBounds(const gfx::Rect& old_bounds, |
| 30 const gfx::Rect& new_bounds) override; |
| 31 std::unique_ptr<ui::PropertyData> OnWillChangeProperty( |
| 32 const void* key) override; |
| 33 void OnPropertyChanged(const void* key, |
| 34 int64_t old_value, |
| 35 std::unique_ptr<ui::PropertyData> data) override; |
| 36 std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink() override; |
| 37 cc::SurfaceId GetSurfaceId() const override; |
| 38 void OnWindowAddedToRootWindow() override; |
| 39 void OnWillRemoveWindowFromRootWindow() override; |
| 40 |
| 41 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(WindowPortForShutdown); |
| 43 }; |
| 44 |
| 45 } // namespace aura |
| 46 |
| 47 #endif // UI_AURA_WINDOW_PORT_FOR_SHUTDOWN_H_ |
OLD | NEW |