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

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase Created 3 years, 10 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
Index: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
index bb33494050b7842fee7b6d50fdde662d00dde86a..1afee602188aaa4c9b5778b734f8dd1b611eb40b 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
@@ -214,19 +214,10 @@ void ChromeNativeAppWindowViews::InitializePanelWindow(
else if (preferred_size_.height() < kMinPanelHeight)
preferred_size_.set_height(kMinPanelHeight);
- // When a panel is not docked it will be placed at a default origin in the
- // currently active target root window.
- // TODO(afakhry): Remove Docked Windows in M58.
- bool use_default_bounds = create_params.state != ui::SHOW_STATE_DOCKED;
- // Sanitize initial origin reseting it in case it was not specified.
- using BoundsSpecification = AppWindow::BoundsSpecification;
- bool position_specified =
- initial_window_bounds.x() != BoundsSpecification::kUnspecifiedPosition &&
- initial_window_bounds.y() != BoundsSpecification::kUnspecifiedPosition;
- params.bounds = (use_default_bounds || !position_specified) ?
- gfx::Rect(preferred_size_) :
- gfx::Rect(initial_window_bounds.origin(), preferred_size_);
- OnBeforePanelWidgetInit(use_default_bounds, &params, widget());
+ // A panel will be placed at a default origin in the currently active target
+ // root window.
+ params.bounds = gfx::Rect(preferred_size_);
+ OnBeforePanelWidgetInit(true /* use_default_bounds */, &params, widget());
widget()->Init(params);
widget()->set_focus_on_creation(create_params.focused);
}

Powered by Google App Engine
This is Rietveld 408576698