OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 CONTENT_BROWSER_WEB_CONTENTS_AURA_CONSTRAINED_WINDOWS_OBSERVER_H__ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_CONSTRAINED_WINDOWS_OBSERVER_H__ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "content/common/content_export.h" |
| 10 #include "ui/aura/window_observer.h" |
| 11 |
| 12 namespace content { |
| 13 |
| 14 class WebContentsViewAura; |
| 15 |
| 16 class CONTENT_EXPORT ConstrainedWindowsObserver |
| 17 : public aura::WindowObserver { |
| 18 public: |
| 19 ConstrainedWindowsObserver(WebContentsViewAura* view); |
| 20 virtual ~ConstrainedWindowsObserver(); |
| 21 |
| 22 // Overridden from aura::WindowObserver: |
| 23 virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE; |
| 24 virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE; |
| 25 virtual void OnWindowVisibilityChanged(aura::Window* window, |
| 26 bool visible) OVERRIDE; |
| 27 virtual void OnWindowParentChanged(aura::Window* window, |
| 28 aura::Window* parent) OVERRIDE; |
| 29 virtual void OnWindowBoundsChanged(aura::Window* window, |
| 30 const gfx::Rect& old_bounds, |
| 31 const gfx::Rect& new_bounds) OVERRIDE; |
| 32 virtual void OnWindowAddedToRootWindow(aura::Window* window) OVERRIDE; |
| 33 virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE; |
| 34 |
| 35 private: |
| 36 void UpdateConstrainedWindows(aura::Window* exclude); |
| 37 |
| 38 WebContentsViewAura* view_; |
| 39 aura::Window* constrained_parent_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowsObserver); |
| 42 }; |
| 43 |
| 44 } //namespace content |
| 45 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_CONSTRAINED_WINDOWS_OBSERVER_H__ |
OLD | NEW |