| 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 "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/shell_window_ids.h" | 8 #include "ash/common/shell_window_ids.h" |
| 9 #include "ash/common/wm/window_resizer.h" | 9 #include "ash/common/wm/window_resizer.h" |
| 10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 } | 645 } |
| 646 | 646 |
| 647 //////////////////////////////////////////////////////////////////////////////// | 647 //////////////////////////////////////////////////////////////////////////////// |
| 648 // views::WidgetDelegate overrides: | 648 // views::WidgetDelegate overrides: |
| 649 | 649 |
| 650 bool ShellSurface::CanResize() const { | 650 bool ShellSurface::CanResize() const { |
| 651 return initial_bounds_.IsEmpty(); | 651 return initial_bounds_.IsEmpty(); |
| 652 } | 652 } |
| 653 | 653 |
| 654 bool ShellSurface::CanMaximize() const { | 654 bool ShellSurface::CanMaximize() const { |
| 655 return true; | 655 // Shell surfaces in system modal container cannot be maximized. |
| 656 return container_ != ash::kShellWindowId_SystemModalContainer; |
| 656 } | 657 } |
| 657 | 658 |
| 658 bool ShellSurface::CanMinimize() const { | 659 bool ShellSurface::CanMinimize() const { |
| 659 return true; | 660 // Shell surfaces in system modal container cannot be minimized. |
| 661 return container_ != ash::kShellWindowId_SystemModalContainer; |
| 660 } | 662 } |
| 661 | 663 |
| 662 base::string16 ShellSurface::GetWindowTitle() const { | 664 base::string16 ShellSurface::GetWindowTitle() const { |
| 663 return title_; | 665 return title_; |
| 664 } | 666 } |
| 665 | 667 |
| 666 void ShellSurface::WindowClosing() { | 668 void ShellSurface::WindowClosing() { |
| 667 if (resizer_) | 669 if (resizer_) |
| 668 EndDrag(true /* revert */); | 670 EndDrag(true /* revert */); |
| 669 SetEnabled(false); | 671 SetEnabled(false); |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 shadow_overlay_->layer()->Add(shadow->layer()); | 1242 shadow_overlay_->layer()->Add(shadow->layer()); |
| 1241 window->AddChild(shadow_overlay_); | 1243 window->AddChild(shadow_overlay_); |
| 1242 shadow_overlay_->Show(); | 1244 shadow_overlay_->Show(); |
| 1243 } | 1245 } |
| 1244 shadow_overlay_->SetBounds(shadow_bounds); | 1246 shadow_overlay_->SetBounds(shadow_bounds); |
| 1245 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); | 1247 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); |
| 1246 } | 1248 } |
| 1247 } | 1249 } |
| 1248 | 1250 |
| 1249 } // namespace exo | 1251 } // namespace exo |
| OLD | NEW |