| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ASH_AURA_WM_WINDOW_AURA_H_ | 5 #ifndef ASH_AURA_WM_WINDOW_AURA_H_ |
| 6 #define ASH_AURA_WM_WINDOW_AURA_H_ | 6 #define ASH_AURA_WM_WINDOW_AURA_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/wm_window.h" | 9 #include "ash/common/wm_window.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class ASH_EXPORT WmWindowAura : public WmWindow, | 21 class ASH_EXPORT WmWindowAura : public WmWindow, |
| 22 public aura::WindowObserver, | 22 public aura::WindowObserver, |
| 23 public ::wm::TransientWindowObserver { | 23 public ::wm::TransientWindowObserver { |
| 24 public: | 24 public: |
| 25 // NOTE: this class is owned by the corresponding window. You shouldn't delete | 25 // NOTE: this class is owned by the corresponding window. You shouldn't delete |
| 26 // TODO(sky): friend deleter and make private. | 26 // TODO(sky): friend deleter and make private. |
| 27 ~WmWindowAura() override; | 27 ~WmWindowAura() override; |
| 28 | 28 |
| 29 // Returns a WmWindow for an aura::Window, creating if necessary. |window| may | 29 // Returns a WmWindow for an aura::Window, creating if necessary. |window| may |
| 30 // be null, in which case null is returned. | 30 // be null, in which case null is returned. |
| 31 static WmWindow* Get(aura::Window* window) { | 31 static WmWindowAura* Get(aura::Window* window) { |
| 32 return const_cast<WmWindow*>(Get(const_cast<const aura::Window*>(window))); | 32 return const_cast<WmWindowAura*>( |
| 33 Get(const_cast<const aura::Window*>(window))); |
| 33 } | 34 } |
| 34 static const WmWindow* Get(const aura::Window* window); | 35 static const WmWindowAura* Get(const aura::Window* window); |
| 35 | 36 |
| 36 static std::vector<WmWindow*> FromAuraWindows( | 37 static std::vector<WmWindow*> FromAuraWindows( |
| 37 const std::vector<aura::Window*>& aura_windows); | 38 const std::vector<aura::Window*>& aura_windows); |
| 38 static std::vector<aura::Window*> ToAuraWindows( | 39 static std::vector<aura::Window*> ToAuraWindows( |
| 39 const std::vector<WmWindow*>& windows); | 40 const std::vector<WmWindow*>& windows); |
| 40 | 41 |
| 41 static aura::Window* GetAuraWindow(WmWindow* wm_window) { | 42 static aura::Window* GetAuraWindow(WmWindow* wm_window) { |
| 42 return const_cast<aura::Window*>( | 43 return const_cast<aura::Window*>( |
| 43 GetAuraWindow(const_cast<const WmWindow*>(wm_window))); | 44 GetAuraWindow(const_cast<const WmWindow*>(wm_window))); |
| 44 } | 45 } |
| 45 static const aura::Window* GetAuraWindow(const WmWindow* wm_window); | 46 static const aura::Window* GetAuraWindow(const WmWindow* wm_window); |
| 46 | 47 |
| 47 aura::Window* aura_window() { return window_; } | 48 aura::Window* aura_window() { return window_; } |
| 48 const aura::Window* aura_window() const { return window_; } | 49 const aura::Window* aura_window() const { return window_; } |
| 49 | 50 |
| 50 // See description of |children_use_extended_hit_region_|. | 51 // See description of |children_use_extended_hit_region_|. |
| 51 bool ShouldUseExtendedHitRegion() const; | 52 bool ShouldUseExtendedHitRegion() const; |
| 52 | 53 |
| 54 wm::WindowState* GetWindowState() { return WmWindow::GetWindowState(); } |
| 55 |
| 53 // WmWindow: | 56 // WmWindow: |
| 54 void Destroy() override; | 57 void Destroy() override; |
| 55 const WmWindow* GetRootWindow() const override; | 58 const WmWindow* GetRootWindow() const override; |
| 56 RootWindowController* GetRootWindowController() override; | 59 RootWindowController* GetRootWindowController() override; |
| 57 WmShell* GetShell() const override; | 60 WmShell* GetShell() const override; |
| 58 void SetName(const char* name) override; | 61 void SetName(const char* name) override; |
| 59 std::string GetName() const override; | 62 std::string GetName() const override; |
| 60 void SetTitle(const base::string16& title) override; | 63 void SetTitle(const base::string16& title) override; |
| 61 base::string16 GetTitle() const override; | 64 base::string16 GetTitle() const override; |
| 62 void SetShellWindowId(int id) override; | 65 void SetShellWindowId(int id) override; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 244 |
| 242 // If true the minimum size is 0x0, default is minimum size comes from widget. | 245 // If true the minimum size is 0x0, default is minimum size comes from widget. |
| 243 bool use_empty_minimum_size_for_testing_; | 246 bool use_empty_minimum_size_for_testing_; |
| 244 | 247 |
| 245 DISALLOW_COPY_AND_ASSIGN(WmWindowAura); | 248 DISALLOW_COPY_AND_ASSIGN(WmWindowAura); |
| 246 }; | 249 }; |
| 247 | 250 |
| 248 } // namespace ash | 251 } // namespace ash |
| 249 | 252 |
| 250 #endif // ASH_AURA_WM_WINDOW_AURA_H_ | 253 #endif // ASH_AURA_WM_WINDOW_AURA_H_ |
| OLD | NEW |