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

Unified Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/mus/desktop_window_tree_host_mus.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/desktop_window_tree_host_mus.cc
diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc
index c991bfc5cf6ae2ca37a69d5f4a7126b8597900bc..acb70db967713db3a08e4212f24bea2de8b7c289 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -216,12 +216,6 @@ DesktopWindowTreeHostMus::~DesktopWindowTreeHostMus() {
desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this);
}
-// TODO(afakhry): Remove Docked Windows in M58.
-bool DesktopWindowTreeHostMus::IsDocked() const {
- return window()->GetProperty(aura::client::kShowStateKey) ==
- ui::SHOW_STATE_DOCKED;
-}
-
void DesktopWindowTreeHostMus::SendClientAreaToServer() {
if (!ShouldSendClientAreaToServer())
return;
@@ -395,11 +389,8 @@ aura::WindowTreeHost* DesktopWindowTreeHostMus::AsWindowTreeHost() {
}
void DesktopWindowTreeHostMus::ShowWindowWithState(ui::WindowShowState state) {
- // TODO(afakhry): Remove Docked Windows in M58.
- if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN ||
- state == ui::SHOW_STATE_DOCKED) {
+ if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN)
window()->SetProperty(aura::client::kShowStateKey, state);
- }
window()->Show();
if (compositor())
compositor()->SetVisible(true);
@@ -501,7 +492,7 @@ gfx::Rect DesktopWindowTreeHostMus::GetClientAreaBoundsInScreen() const {
gfx::Rect DesktopWindowTreeHostMus::GetRestoredBounds() const {
// Restored bounds should only be relevant if the window is minimized,
- // maximized, fullscreen or docked. However, in some places the code expects
+ // maximized, or fullscreen. However, in some places the code expects
// GetRestoredBounds() to return the current window bounds if the window is
// not in either state.
if (IsMinimized() || IsMaximized() || IsFullscreen()) {
@@ -511,20 +502,7 @@ gfx::Rect DesktopWindowTreeHostMus::GetRestoredBounds() const {
if (restore_bounds)
return *restore_bounds;
}
- gfx::Rect bounds = GetWindowBoundsInScreen();
- if (IsDocked()) {
- // Restore bounds are in screen coordinates, no need to convert.
- gfx::Rect* restore_bounds =
- window()->GetProperty(aura::client::kRestoreBoundsKey);
- // Use current window horizontal offset origin in order to preserve docked
- // alignment but preserve restored size and vertical offset for the time
- // when the |window_| gets undocked.
- if (restore_bounds) {
- bounds.set_size(restore_bounds->size());
- bounds.set_y(restore_bounds->y());
- }
- }
- return bounds;
+ return GetWindowBoundsInScreen();
}
std::string DesktopWindowTreeHostMus::GetWorkspace() const {
« no previous file with comments | « ui/views/mus/desktop_window_tree_host_mus.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698