| 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 COMPONENTS_MUS_WS_SERVER_WINDOW_H_ | 5 #ifndef COMPONENTS_MUS_WS_SERVER_WINDOW_H_ |
| 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_H_ | 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 void set_can_focus(bool can_focus) { can_focus_ = can_focus; } | 127 void set_can_focus(bool can_focus) { can_focus_ = can_focus; } |
| 128 bool can_focus() const { return can_focus_; } | 128 bool can_focus() const { return can_focus_; } |
| 129 | 129 |
| 130 // Returns true if this window is attached to a root and all ancestors are | 130 // Returns true if this window is attached to a root and all ancestors are |
| 131 // visible. | 131 // visible. |
| 132 bool IsDrawn() const; | 132 bool IsDrawn() const; |
| 133 | 133 |
| 134 // Called when its appropriate to destroy surfaces scheduled for destruction. | 134 // Called when its appropriate to destroy surfaces scheduled for destruction. |
| 135 void DestroySurfacesScheduledForDestruction(); | 135 void DestroySurfacesScheduledForDestruction(); |
| 136 | 136 |
| 137 const gfx::Insets& extended_hit_test_region() const { |
| 138 return extended_hit_test_region_; |
| 139 } |
| 140 void set_extended_hit_test_region(const gfx::Insets& insets) { |
| 141 extended_hit_test_region_ = insets; |
| 142 } |
| 143 |
| 137 ServerWindowSurfaceManager* GetOrCreateSurfaceManager(); | 144 ServerWindowSurfaceManager* GetOrCreateSurfaceManager(); |
| 138 ServerWindowSurfaceManager* surface_manager() { | 145 ServerWindowSurfaceManager* surface_manager() { |
| 139 return surface_manager_.get(); | 146 return surface_manager_.get(); |
| 140 } | 147 } |
| 148 const ServerWindowSurfaceManager* surface_manager() const { |
| 149 return surface_manager_.get(); |
| 150 } |
| 141 | 151 |
| 142 // Offset of the underlay from the the window bounds (used for shadows). | 152 // Offset of the underlay from the the window bounds (used for shadows). |
| 143 const gfx::Vector2d& underlay_offset() const { return underlay_offset_; } | 153 const gfx::Vector2d& underlay_offset() const { return underlay_offset_; } |
| 144 void SetUnderlayOffset(const gfx::Vector2d& offset); | 154 void SetUnderlayOffset(const gfx::Vector2d& offset); |
| 145 | 155 |
| 146 ServerWindowDelegate* delegate() { return delegate_; } | 156 ServerWindowDelegate* delegate() { return delegate_; } |
| 147 | 157 |
| 148 #if !defined(NDEBUG) | 158 #if !defined(NDEBUG) |
| 149 std::string GetDebugWindowHierarchy() const; | 159 std::string GetDebugWindowHierarchy() const; |
| 150 void BuildDebugInfo(const std::string& depth, std::string* result) const; | 160 void BuildDebugInfo(const std::string& depth, std::string* result) const; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 scoped_ptr<ServerWindowSurfaceManager> surface_manager_; | 193 scoped_ptr<ServerWindowSurfaceManager> surface_manager_; |
| 184 float opacity_; | 194 float opacity_; |
| 185 bool can_focus_; | 195 bool can_focus_; |
| 186 gfx::Transform transform_; | 196 gfx::Transform transform_; |
| 187 ui::TextInputState text_input_state_; | 197 ui::TextInputState text_input_state_; |
| 188 | 198 |
| 189 Properties properties_; | 199 Properties properties_; |
| 190 | 200 |
| 191 gfx::Vector2d underlay_offset_; | 201 gfx::Vector2d underlay_offset_; |
| 192 | 202 |
| 203 // The hit test for windows extends outside the bounds of the window by this |
| 204 // amount. |
| 205 gfx::Insets extended_hit_test_region_; |
| 206 |
| 193 base::ObserverList<ServerWindowObserver> observers_; | 207 base::ObserverList<ServerWindowObserver> observers_; |
| 194 | 208 |
| 195 DISALLOW_COPY_AND_ASSIGN(ServerWindow); | 209 DISALLOW_COPY_AND_ASSIGN(ServerWindow); |
| 196 }; | 210 }; |
| 197 | 211 |
| 198 } // namespace ws | 212 } // namespace ws |
| 199 } // namespace mus | 213 } // namespace mus |
| 200 | 214 |
| 201 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_H_ | 215 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_H_ |
| OLD | NEW |