| 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_COMMON_WM_WINDOW_H_ | 5 #ifndef ASH_COMMON_WM_WINDOW_H_ |
| 6 #define ASH_COMMON_WM_WINDOW_H_ | 6 #define ASH_COMMON_WM_WINDOW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "third_party/skia/include/core/SkColor.h" | 14 #include "third_party/skia/include/core/SkColor.h" |
| 15 #include "ui/base/ui_base_types.h" | 15 #include "ui/base/ui_base_types.h" |
| 16 #include "ui/compositor/layer_animation_element.h" | 16 #include "ui/compositor/layer_animation_element.h" |
| 17 #include "ui/gfx/image/image_skia.h" |
| 17 #include "ui/wm/core/window_animations.h" | 18 #include "ui/wm/core/window_animations.h" |
| 18 #include "ui/wm/public/window_types.h" | 19 #include "ui/wm/public/window_types.h" |
| 19 | 20 |
| 20 namespace display { | 21 namespace display { |
| 21 class Display; | 22 class Display; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace gfx { | 25 namespace gfx { |
| 25 class Point; | 26 class Point; |
| 26 class Rect; | 27 class Rect; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 virtual void SetTransform(const gfx::Transform& transform) = 0; | 131 virtual void SetTransform(const gfx::Transform& transform) = 0; |
| 131 virtual gfx::Transform GetTargetTransform() const = 0; | 132 virtual gfx::Transform GetTargetTransform() const = 0; |
| 132 | 133 |
| 133 virtual bool IsSystemModal() const = 0; | 134 virtual bool IsSystemModal() const = 0; |
| 134 | 135 |
| 135 virtual bool GetBoolProperty(WmWindowProperty key) = 0; | 136 virtual bool GetBoolProperty(WmWindowProperty key) = 0; |
| 136 virtual SkColor GetColorProperty(WmWindowProperty key) = 0; | 137 virtual SkColor GetColorProperty(WmWindowProperty key) = 0; |
| 137 virtual void SetColorProperty(WmWindowProperty key, SkColor value) = 0; | 138 virtual void SetColorProperty(WmWindowProperty key, SkColor value) = 0; |
| 138 virtual int GetIntProperty(WmWindowProperty key) = 0; | 139 virtual int GetIntProperty(WmWindowProperty key) = 0; |
| 139 virtual void SetIntProperty(WmWindowProperty key, int value) = 0; | 140 virtual void SetIntProperty(WmWindowProperty key, int value) = 0; |
| 141 virtual std::string GetStringProperty(WmWindowProperty key) = 0; |
| 142 virtual void SetStringProperty(WmWindowProperty key, |
| 143 const std::string& value) = 0; |
| 144 |
| 145 virtual gfx::ImageSkia GetWindowIcon() = 0; |
| 146 virtual gfx::ImageSkia GetAppIcon() = 0; |
| 140 | 147 |
| 141 wm::WindowState* GetWindowState() { | 148 wm::WindowState* GetWindowState() { |
| 142 return const_cast<wm::WindowState*>( | 149 return const_cast<wm::WindowState*>( |
| 143 const_cast<const WmWindow*>(this)->GetWindowState()); | 150 const_cast<const WmWindow*>(this)->GetWindowState()); |
| 144 } | 151 } |
| 145 virtual const wm::WindowState* GetWindowState() const = 0; | 152 virtual const wm::WindowState* GetWindowState() const = 0; |
| 146 | 153 |
| 147 // The implementation of this matches aura::Window::GetToplevelWindow(). | 154 // The implementation of this matches aura::Window::GetToplevelWindow(). |
| 148 virtual WmWindow* GetToplevelWindow() = 0; | 155 virtual WmWindow* GetToplevelWindow() = 0; |
| 149 // The implementation of this matches | 156 // The implementation of this matches |
| (...skipping 12 matching lines...) Expand all Loading... |
| 162 } | 169 } |
| 163 virtual const WmWindow* GetParent() const = 0; | 170 virtual const WmWindow* GetParent() const = 0; |
| 164 | 171 |
| 165 WmWindow* GetTransientParent() { | 172 WmWindow* GetTransientParent() { |
| 166 return const_cast<WmWindow*>( | 173 return const_cast<WmWindow*>( |
| 167 const_cast<const WmWindow*>(this)->GetTransientParent()); | 174 const_cast<const WmWindow*>(this)->GetTransientParent()); |
| 168 } | 175 } |
| 169 virtual const WmWindow* GetTransientParent() const = 0; | 176 virtual const WmWindow* GetTransientParent() const = 0; |
| 170 virtual Windows GetTransientChildren() = 0; | 177 virtual Windows GetTransientChildren() = 0; |
| 171 | 178 |
| 179 // Moves this to the display where |event| occurred; returns true if moved. |
| 180 virtual bool MoveToEventRoot(const ui::Event& event) = 0; |
| 181 |
| 172 virtual void SetLayoutManager( | 182 virtual void SetLayoutManager( |
| 173 std::unique_ptr<WmLayoutManager> layout_manager) = 0; | 183 std::unique_ptr<WmLayoutManager> layout_manager) = 0; |
| 174 virtual WmLayoutManager* GetLayoutManager() = 0; | 184 virtual WmLayoutManager* GetLayoutManager() = 0; |
| 175 | 185 |
| 176 // See wm::SetWindowVisibilityChangesAnimated() for details on what this | 186 // See wm::SetWindowVisibilityChangesAnimated() for details on what this |
| 177 // does. | 187 // does. |
| 178 virtual void SetVisibilityChangesAnimated() = 0; | 188 virtual void SetVisibilityChangesAnimated() = 0; |
| 179 // |type| is WindowVisibilityAnimationType. Has to be an int to match aura. | 189 // |type| is WindowVisibilityAnimationType. Has to be an int to match aura. |
| 180 virtual void SetVisibilityAnimationType(int type) = 0; | 190 virtual void SetVisibilityAnimationType(int type) = 0; |
| 181 virtual void SetVisibilityAnimationDuration(base::TimeDelta delta) = 0; | 191 virtual void SetVisibilityAnimationDuration(base::TimeDelta delta) = 0; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 virtual void AddLimitedPreTargetHandler(ui::EventHandler* handler) = 0; | 340 virtual void AddLimitedPreTargetHandler(ui::EventHandler* handler) = 0; |
| 331 virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0; | 341 virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0; |
| 332 | 342 |
| 333 protected: | 343 protected: |
| 334 virtual ~WmWindow() {} | 344 virtual ~WmWindow() {} |
| 335 }; | 345 }; |
| 336 | 346 |
| 337 } // namespace ash | 347 } // namespace ash |
| 338 | 348 |
| 339 #endif // ASH_COMMON_WM_WINDOW_H_ | 349 #endif // ASH_COMMON_WM_WINDOW_H_ |
| OLD | NEW |