Index: ui/aura_shell/transient_container_layout_manager.h |
=================================================================== |
--- ui/aura_shell/transient_container_layout_manager.h (revision 0) |
+++ ui/aura_shell/transient_container_layout_manager.h (revision 0) |
@@ -0,0 +1,92 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_AURA_SHELL_TRANSIENT_CONTAINER_LAYOUT_MANAGER_H_ |
+#define UI_AURA_SHELL_TRANSIENT_CONTAINER_LAYOUT_MANAGER_H_ |
+#pragma once |
+ |
+#include <vector> |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "ui/aura/layout_manager.h" |
+#include "ui/aura/window_observer.h" |
+#include "ui/aura_shell/aura_shell_export.h" |
+#include "ui/aura_shell/modality_event_filter.h" |
+#include "ui/gfx/compositor/layer_animation_observer.h" |
+ |
+namespace aura { |
+class Window; |
+class EventFilter; |
+} |
+namespace gfx { |
+class Rect; |
+} |
+namespace views { |
+class Widget; |
+} |
+ |
+namespace aura_shell { |
+namespace internal { |
+ |
+// LayoutManager for the transient window container. |
+class AURA_SHELL_EXPORT TransientContainerLayoutManager |
+ : public aura::LayoutManager, |
+ public aura::WindowObserver, |
+ public ui::LayerAnimationObserver, |
+ public ModalityEventFilter::Delegate { |
+ public: |
+ explicit TransientContainerLayoutManager(aura::Window* container); |
+ virtual ~TransientContainerLayoutManager(); |
+ |
+ // Overridden from aura::LayoutManager: |
+ virtual void OnWindowResized() OVERRIDE; |
+ virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; |
+ virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; |
+ virtual void OnChildWindowVisibilityChanged(aura::Window* child, |
+ bool visibile) OVERRIDE; |
+ virtual void SetChildBounds(aura::Window* child, |
+ const gfx::Rect& requested_bounds) OVERRIDE; |
+ |
+ // Overridden from aura::WindowObserver: |
+ virtual void OnPropertyChanged(aura::Window* window, |
+ const char* key, |
+ void* old) OVERRIDE; |
+ |
+ // Overridden from ui::LayerAnimationObserver: |
+ virtual void OnLayerAnimationEnded( |
+ const ui::LayerAnimationSequence* sequence) OVERRIDE; |
+ virtual void OnLayerAnimationAborted( |
+ const ui::LayerAnimationSequence* sequence) OVERRIDE; |
+ virtual void OnLayerAnimationScheduled( |
+ const ui::LayerAnimationSequence* sequence) OVERRIDE; |
+ |
+ // Overridden from ModalityEventFilter::Delegate: |
+ virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; |
+ |
+ private: |
+ void AddModalWindow(aura::Window* window); |
+ void RemoveModalWindow(aura::Window* window); |
+ |
+ void CreateModalScreen(); |
+ void DestroyModalScreen(); |
+ void HideModalScreen(); |
+ |
+ aura::Window* modal_window() { |
+ return !modal_windows_.empty() ? modal_windows_.back() : NULL; |
+ } |
+ |
+ aura::Window* container_; |
+ views::Widget* modal_screen_; |
sky
2011/11/16 17:13:06
Add a description for these. At least modal_screen
|
+ std::vector<aura::Window*> modal_windows_; |
+ scoped_ptr<aura::EventFilter> modality_filter_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TransientContainerLayoutManager); |
+}; |
+ |
+} // namespace internal |
+} // namespace aura_shell |
+ |
+#endif // UI_AURA_SHELL_TRANSIENT_CONTAINER_LAYOUT_MANAGER_H_ |
Property changes on: ui\aura_shell\transient_container_layout_manager.h |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |