Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: components/exo/shell_surface.cc

Issue 2822643002: Do not save/restore window state for client which controls its own bounds. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/exo/shell_surface.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/common/frame/custom_frame_view_ash.h" 9 #include "ash/common/frame/custom_frame_view_ash.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 } 840 }
841 841
842 bool ShellSurface::CanMinimize() const { 842 bool ShellSurface::CanMinimize() const {
843 return can_minimize_; 843 return can_minimize_;
844 } 844 }
845 845
846 base::string16 ShellSurface::GetWindowTitle() const { 846 base::string16 ShellSurface::GetWindowTitle() const {
847 return title_; 847 return title_;
848 } 848 }
849 849
850 void ShellSurface::SaveWindowPlacement(const gfx::Rect& bounds,
851 ui::WindowShowState show_state) {
852 if (bounds_mode_ != BoundsMode::CLIENT)
853 WidgetDelegate::SaveWindowPlacement(bounds, show_state);
854 }
855
856 bool ShellSurface::GetSavedWindowPlacement(
857 const views::Widget* widget,
858 gfx::Rect* bounds,
859 ui::WindowShowState* show_state) const {
860 if (bounds_mode_ != BoundsMode::CLIENT)
861 return WidgetDelegate::GetSavedWindowPlacement(widget, bounds, show_state);
862 return false;
863 }
864
850 void ShellSurface::WindowClosing() { 865 void ShellSurface::WindowClosing() {
851 if (resizer_) 866 if (resizer_)
852 EndDrag(true /* revert */); 867 EndDrag(true /* revert */);
853 SetEnabled(false); 868 SetEnabled(false);
854 widget_ = nullptr; 869 widget_ = nullptr;
855 shadow_overlay_ = nullptr; 870 shadow_overlay_ = nullptr;
856 shadow_underlay_ = nullptr; 871 shadow_underlay_ = nullptr;
857 } 872 }
858 873
859 views::Widget* ShellSurface::GetWidget() { 874 views::Widget* ShellSurface::GetWidget() {
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 // small style shadow for them. 1608 // small style shadow for them.
1594 if (!activatable_) 1609 if (!activatable_)
1595 shadow->SetElevation(wm::ShadowElevation::SMALL); 1610 shadow->SetElevation(wm::ShadowElevation::SMALL);
1596 // We don't have rounded corners unless frame is enabled. 1611 // We don't have rounded corners unless frame is enabled.
1597 if (!frame_enabled_) 1612 if (!frame_enabled_)
1598 shadow->SetRoundedCornerRadius(0); 1613 shadow->SetRoundedCornerRadius(0);
1599 } 1614 }
1600 } 1615 }
1601 1616
1602 } // namespace exo 1617 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/shell_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698