OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "components/exo/shell_surface.h" | 5 #include "components/exo/shell_surface.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 // Note: This will ask client to configure its surface even if already | 440 // Note: This will ask client to configure its surface even if already |
441 // maximized. | 441 // maximized. |
442 ScopedConfigure scoped_configure(this, true); | 442 ScopedConfigure scoped_configure(this, true); |
443 widget_->Maximize(); | 443 widget_->Maximize(); |
444 } | 444 } |
445 | 445 |
446 void ShellSurface::Minimize() { | 446 void ShellSurface::Minimize() { |
447 TRACE_EVENT0("exo", "ShellSurface::Minimize"); | 447 TRACE_EVENT0("exo", "ShellSurface::Minimize"); |
448 | 448 |
449 if (!widget_) | 449 if (!widget_) |
450 return; | 450 CreateShellSurfaceWidget(ui::SHOW_STATE_MINIMIZED); |
451 | 451 |
452 // Note: This will ask client to configure its surface even if already | 452 // Note: This will ask client to configure its surface even if already |
453 // minimized. | 453 // minimized. |
454 ScopedConfigure scoped_configure(this, true); | 454 ScopedConfigure scoped_configure(this, true); |
455 widget_->Minimize(); | 455 widget_->Minimize(); |
456 } | 456 } |
457 | 457 |
458 void ShellSurface::Restore() { | 458 void ShellSurface::Restore() { |
459 TRACE_EVENT0("exo", "ShellSurface::Restore"); | 459 TRACE_EVENT0("exo", "ShellSurface::Restore"); |
460 | 460 |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 shadow_overlay_->layer()->Add(shadow->layer()); | 1402 shadow_overlay_->layer()->Add(shadow->layer()); |
1403 window->AddChild(shadow_overlay_); | 1403 window->AddChild(shadow_overlay_); |
1404 shadow_overlay_->Show(); | 1404 shadow_overlay_->Show(); |
1405 } | 1405 } |
1406 shadow_overlay_->SetBounds(shadow_bounds); | 1406 shadow_overlay_->SetBounds(shadow_bounds); |
1407 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); | 1407 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); |
1408 } | 1408 } |
1409 } | 1409 } |
1410 | 1410 |
1411 } // namespace exo | 1411 } // namespace exo |
OLD | NEW |