| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ATHENA_SCREEN_MODAL_WINDOW_CONTROLLER_H_ | 5 #ifndef ATHENA_SCREEN_MODAL_WINDOW_CONTROLLER_H_ |
| 6 #define ATHENA_SCREEN_MODAL_WINDOW_CONTROLLER_H_ | 6 #define ATHENA_SCREEN_MODAL_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "athena/athena_export.h" | 8 #include "athena/athena_export.h" |
| 9 #include "ui/aura/window_observer.h" | 9 #include "ui/aura/window_observer.h" |
| 10 | 10 |
| 11 namespace athena { | 11 namespace athena { |
| 12 | 12 |
| 13 // ModalWindow controller manages the modal window and | 13 // ModalWindow controller manages the modal window and |
| 14 // its container. This gets created when a modal window is opened | 14 // its container. This gets created when a modal window is opened |
| 15 // and deleted when all modal windows are deleted. | 15 // and deleted when all modal windows are deleted. |
| 16 class ATHENA_EXPORT ModalWindowController : public aura::WindowObserver { | 16 class ATHENA_EXPORT ModalWindowController : public aura::WindowObserver { |
| 17 public: | 17 public: |
| 18 // Returns the ModalWindowController associated with the container. | 18 // Returns the ModalWindowController associated with the container. |
| 19 static ModalWindowController* Get(aura::Window* container); | 19 static ModalWindowController* Get(aura::Window* container); |
| 20 | 20 |
| 21 explicit ModalWindowController(int container_priority); | 21 explicit ModalWindowController(int container_priority); |
| 22 virtual ~ModalWindowController(); | 22 ~ModalWindowController() override; |
| 23 | 23 |
| 24 aura::Window* modal_container() { return modal_container_; } | 24 aura::Window* modal_container() { return modal_container_; } |
| 25 | 25 |
| 26 bool dimmed() const { return dimmed_; } | 26 bool dimmed() const { return dimmed_; } |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 // aura::WindowObserver: | 29 // aura::WindowObserver: |
| 30 virtual void OnWindowAdded(aura::Window* child) override; | 30 virtual void OnWindowAdded(aura::Window* child) override; |
| 31 virtual void OnWindowVisibilityChanged(aura::Window* window, | 31 virtual void OnWindowVisibilityChanged(aura::Window* window, |
| 32 bool visible) override; | 32 bool visible) override; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 50 aura::Window* modal_container_; // not owned. | 50 aura::Window* modal_container_; // not owned. |
| 51 aura::Window* dimmer_window_; // not owned. | 51 aura::Window* dimmer_window_; // not owned. |
| 52 | 52 |
| 53 bool dimmed_; | 53 bool dimmed_; |
| 54 DISALLOW_COPY_AND_ASSIGN(ModalWindowController); | 54 DISALLOW_COPY_AND_ASSIGN(ModalWindowController); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace athena | 57 } // namespace athena |
| 58 | 58 |
| 59 #endif // ATHENA_SCREEN_MODAL_WINDOW_CONTROLLER_H_ | 59 #endif // ATHENA_SCREEN_MODAL_WINDOW_CONTROLLER_H_ |
| OLD | NEW |