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

Unified Diff: ui/views/widget/native_widget_aura.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/widget/native_widget_aura.h ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 9c2c1b0f8a93f313059fefc14ad323b641308f51..4904f00c228f44d1686a8e7a59ee0e275e82fe82 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -430,7 +430,7 @@ gfx::Rect NativeWidgetAura::GetRestoredBounds() const {
return gfx::Rect();
// 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()) {
@@ -440,20 +440,7 @@ gfx::Rect NativeWidgetAura::GetRestoredBounds() const {
if (restore_bounds)
return *restore_bounds;
}
- gfx::Rect bounds = window_->GetBoundsInScreen();
- 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 window_->GetBoundsInScreen();
}
std::string NativeWidgetAura::GetWorkspace() const {
@@ -541,11 +528,8 @@ void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) {
if (!window_)
return;
- // 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 (delegate_->CanActivate()) {
if (state != ui::SHOW_STATE_INACTIVE)
@@ -1000,13 +984,6 @@ NativeWidgetAura::~NativeWidgetAura() {
////////////////////////////////////////////////////////////////////////////////
// NativeWidgetAura, private:
-// TODO(afakhry): Remove Docked Windows in M58.
-bool NativeWidgetAura::IsDocked() const {
- return window_ &&
- window_->GetProperty(aura::client::kShowStateKey) ==
- ui::SHOW_STATE_DOCKED;
-}
-
void NativeWidgetAura::SetInitialFocus(ui::WindowShowState show_state) {
// The window does not get keyboard messages unless we focus it.
if (!GetWidget()->SetInitialFocus(show_state))
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698