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 |
(...skipping 20 matching lines...) Expand all Loading... |
31 class Transform; | 31 class Transform; |
32 } | 32 } |
33 | 33 |
34 namespace ui { | 34 namespace ui { |
35 class EventHandler; | 35 class EventHandler; |
36 class Layer; | 36 class Layer; |
37 } | 37 } |
38 | 38 |
39 namespace views { | 39 namespace views { |
40 class View; | 40 class View; |
41 class Widget; | |
42 } | 41 } |
43 | 42 |
44 namespace ash { | 43 namespace ash { |
45 | 44 |
46 class ImmersiveFullscreenController; | 45 class ImmersiveFullscreenController; |
47 class RootWindowController; | 46 class RootWindowController; |
48 class WmLayoutManager; | 47 class WmLayoutManager; |
49 class WmShell; | 48 class WmShell; |
50 class WmTransientWindowObserver; | 49 class WmTransientWindowObserver; |
51 class WmWindowTestApi; | 50 class WmWindowTestApi; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 void StackChildAtBottom(WmWindow* child); | 271 void StackChildAtBottom(WmWindow* child); |
273 void StackChildAbove(WmWindow* child, WmWindow* target); | 272 void StackChildAbove(WmWindow* child, WmWindow* target); |
274 void StackChildBelow(WmWindow* child, WmWindow* target); | 273 void StackChildBelow(WmWindow* child, WmWindow* target); |
275 | 274 |
276 void SetAlwaysOnTop(bool value); | 275 void SetAlwaysOnTop(bool value); |
277 bool IsAlwaysOnTop() const; | 276 bool IsAlwaysOnTop() const; |
278 | 277 |
279 void Hide(); | 278 void Hide(); |
280 void Show(); | 279 void Show(); |
281 | 280 |
282 // Returns the widget associated with this window, or null if not associated | |
283 // with a widget. Only ash system UI widgets are returned, not widgets created | |
284 // by the mus window manager code to show a non-client frame. | |
285 views::Widget* GetInternalWidget(); | |
286 | |
287 // Requests the window to close and destroy itself. This is intended to | 281 // Requests the window to close and destroy itself. This is intended to |
288 // forward to an associated widget. | 282 // forward to an associated widget. |
289 void CloseWidget(); | 283 void CloseWidget(); |
290 | 284 |
291 void SetFocused(); | 285 void SetFocused(); |
292 bool IsFocused() const; | 286 bool IsFocused() const; |
293 | 287 |
294 bool IsActive() const; | 288 bool IsActive() const; |
295 void Activate(); | 289 void Activate(); |
296 void Deactivate(); | 290 void Deactivate(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 323 |
330 // Returns a View that renders the contents of this window's layers. | 324 // Returns a View that renders the contents of this window's layers. |
331 std::unique_ptr<views::View> CreateViewWithRecreatedLayers(); | 325 std::unique_ptr<views::View> CreateViewWithRecreatedLayers(); |
332 | 326 |
333 void AddTransientWindowObserver(WmTransientWindowObserver* observer); | 327 void AddTransientWindowObserver(WmTransientWindowObserver* observer); |
334 void RemoveTransientWindowObserver(WmTransientWindowObserver* observer); | 328 void RemoveTransientWindowObserver(WmTransientWindowObserver* observer); |
335 | 329 |
336 // Adds or removes a handler to receive events targeted at this window, before | 330 // Adds or removes a handler to receive events targeted at this window, before |
337 // this window handles the events itself; the handler does not recieve events | 331 // this window handles the events itself; the handler does not recieve events |
338 // from embedded windows. This only supports windows with internal widgets; | 332 // from embedded windows. This only supports windows with internal widgets; |
339 // see GetInternalWidget(). Ownership of the handler is not transferred. | 333 // see ash::GetInternalWidgetForWindow(). Ownership of the handler is not |
| 334 // transferred. |
340 // | 335 // |
341 // Also note that the target of these events is always an aura::Window. | 336 // Also note that the target of these events is always an aura::Window. |
342 void AddLimitedPreTargetHandler(ui::EventHandler* handler); | 337 void AddLimitedPreTargetHandler(ui::EventHandler* handler); |
343 void RemoveLimitedPreTargetHandler(ui::EventHandler* handler); | 338 void RemoveLimitedPreTargetHandler(ui::EventHandler* handler); |
344 | 339 |
345 private: | 340 private: |
346 friend class WmWindowTestApi; | 341 friend class WmWindowTestApi; |
347 | 342 |
348 explicit WmWindow(aura::Window* window); | 343 explicit WmWindow(aura::Window* window); |
349 | 344 |
(...skipping 22 matching lines...) Expand all Loading... |
372 | 367 |
373 // If true the minimum size is 0x0, default is minimum size comes from widget. | 368 // If true the minimum size is 0x0, default is minimum size comes from widget. |
374 bool use_empty_minimum_size_for_testing_; | 369 bool use_empty_minimum_size_for_testing_; |
375 | 370 |
376 DISALLOW_COPY_AND_ASSIGN(WmWindow); | 371 DISALLOW_COPY_AND_ASSIGN(WmWindow); |
377 }; | 372 }; |
378 | 373 |
379 } // namespace ash | 374 } // namespace ash |
380 | 375 |
381 #endif // ASH_COMMON_WM_WINDOW_H_ | 376 #endif // ASH_COMMON_WM_WINDOW_H_ |
OLD | NEW |