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

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

Issue 2807243007: Do not save/restore window state for client with BoundsMode::CLIENT. (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/frame/custom_frame_view_ash.h" 9 #include "ash/frame/custom_frame_view_ash.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 } 838 }
839 839
840 bool ShellSurface::CanMinimize() const { 840 bool ShellSurface::CanMinimize() const {
841 return can_minimize_; 841 return can_minimize_;
842 } 842 }
843 843
844 base::string16 ShellSurface::GetWindowTitle() const { 844 base::string16 ShellSurface::GetWindowTitle() const {
845 return title_; 845 return title_;
846 } 846 }
847 847
848 void ShellSurface::SaveWindowPlacement(const gfx::Rect& bounds,
849 ui::WindowShowState show_state) {
850 if (bounds_mode_ != BoundsMode::CLIENT)
851 WidgetDelegate::SaveWindowPlacement(bounds, show_state);
852 }
853
854 bool ShellSurface::GetSavedWindowPlacement(
855 const views::Widget* widget,
856 gfx::Rect* bounds,
857 ui::WindowShowState* show_state) const {
858 if (bounds_mode_ != BoundsMode::CLIENT)
859 return WidgetDelegate::GetSavedWindowPlacement(widget, bounds, show_state);
860 return false;
861 }
862
848 void ShellSurface::WindowClosing() { 863 void ShellSurface::WindowClosing() {
849 if (resizer_) 864 if (resizer_)
850 EndDrag(true /* revert */); 865 EndDrag(true /* revert */);
851 SetEnabled(false); 866 SetEnabled(false);
852 widget_ = nullptr; 867 widget_ = nullptr;
853 shadow_overlay_ = nullptr; 868 shadow_overlay_ = nullptr;
854 shadow_underlay_ = nullptr; 869 shadow_underlay_ = nullptr;
855 } 870 }
856 871
857 views::Widget* ShellSurface::GetWidget() { 872 views::Widget* ShellSurface::GetWidget() {
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 gfx::Point ShellSurface::GetMouseLocation() const { 1711 gfx::Point ShellSurface::GetMouseLocation() const {
1697 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); 1712 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow();
1698 gfx::Point location = 1713 gfx::Point location =
1699 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); 1714 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot();
1700 aura::Window::ConvertPointToTarget( 1715 aura::Window::ConvertPointToTarget(
1701 root_window, widget_->GetNativeWindow()->parent(), &location); 1716 root_window, widget_->GetNativeWindow()->parent(), &location);
1702 return location; 1717 return location;
1703 } 1718 }
1704 1719
1705 } // namespace exo 1720 } // 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