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

Unified Diff: chrome/browser/ui/views/frame/browser_frame_ash.cc

Issue 1221193009: [Docking] Persists docked state for tab-less browser windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Docking] Persists docked state for tab-less browser windows (nits) Created 5 years, 5 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/frame/browser_frame_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_frame_ash.cc b/chrome/browser/ui/views/frame/browser_frame_ash.cc
index b48a51bc5e8f76a4c0a36e940c6c4e759c38d7a7..22f2a99747e97210997fafd42e9af4196c9caabd 100644
--- a/chrome/browser/ui/views/frame/browser_frame_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_ash.cc
@@ -121,6 +121,20 @@ void BrowserFrameAsh::GetWindowPlacement(
*show_state != ui::SHOW_STATE_MINIMIZED) {
*show_state = ui::SHOW_STATE_NORMAL;
}
+
+ if (ash::wm::GetWindowState(GetNativeWindow())->IsDocked()) {
+ if (browser_view_->browser()->is_app()) {
+ // Only web app windows (not tabbed browser windows) persist docked state.
+ *show_state = ui::SHOW_STATE_DOCKED;
+ } else {
+ // Restore original restore bounds for tabbed browser windows ignoring
+ // the docked origin.
+ gfx::Rect* restore_bounds = GetWidget()->GetNativeWindow()->GetProperty(
+ aura::client::kRestoreBoundsKey);
+ if (restore_bounds)
+ *bounds = *restore_bounds;
+ }
+ }
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698