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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 2652043004: Remove persisted docked windows (Closed)
Patch Set: varkha's comments Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/chrome_views_delegate.h" 5 #include "chrome/browser/ui/views/chrome_views_delegate.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 std::unique_ptr<DictionaryPrefUpdate> pref_update = 225 std::unique_ptr<DictionaryPrefUpdate> pref_update =
226 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs); 226 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs);
227 base::DictionaryValue* window_preferences = pref_update->Get(); 227 base::DictionaryValue* window_preferences = pref_update->Get();
228 window_preferences->SetInteger("left", bounds.x()); 228 window_preferences->SetInteger("left", bounds.x());
229 window_preferences->SetInteger("top", bounds.y()); 229 window_preferences->SetInteger("top", bounds.y());
230 window_preferences->SetInteger("right", bounds.right()); 230 window_preferences->SetInteger("right", bounds.right());
231 window_preferences->SetInteger("bottom", bounds.bottom()); 231 window_preferences->SetInteger("bottom", bounds.bottom());
232 window_preferences->SetBoolean("maximized", 232 window_preferences->SetBoolean("maximized",
233 show_state == ui::SHOW_STATE_MAXIMIZED); 233 show_state == ui::SHOW_STATE_MAXIMIZED);
234 // TODO(afakhry): Remove Docked Windows in M58.
234 window_preferences->SetBoolean("docked", show_state == ui::SHOW_STATE_DOCKED); 235 window_preferences->SetBoolean("docked", show_state == ui::SHOW_STATE_DOCKED);
236
235 gfx::Rect work_area(display::Screen::GetScreen() 237 gfx::Rect work_area(display::Screen::GetScreen()
236 ->GetDisplayNearestWindow(window->GetNativeView()) 238 ->GetDisplayNearestWindow(window->GetNativeView())
237 .work_area()); 239 .work_area());
238 window_preferences->SetInteger("work_area_left", work_area.x()); 240 window_preferences->SetInteger("work_area_left", work_area.x());
239 window_preferences->SetInteger("work_area_top", work_area.y()); 241 window_preferences->SetInteger("work_area_top", work_area.y());
240 window_preferences->SetInteger("work_area_right", work_area.right()); 242 window_preferences->SetInteger("work_area_right", work_area.right());
241 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); 243 window_preferences->SetInteger("work_area_bottom", work_area.bottom());
242 } 244 }
243 245
244 bool ChromeViewsDelegate::GetSavedWindowPlacement( 246 bool ChromeViewsDelegate::GetSavedWindowPlacement(
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 return ViewsDelegate::GetBubbleDialogMargins(); 571 return ViewsDelegate::GetBubbleDialogMargins();
570 } 572 }
571 573
572 #if !defined(USE_ASH) 574 #if !defined(USE_ASH)
573 views::Widget::InitParams::WindowOpacity 575 views::Widget::InitParams::WindowOpacity
574 ChromeViewsDelegate::GetOpacityForInitParams( 576 ChromeViewsDelegate::GetOpacityForInitParams(
575 const views::Widget::InitParams& params) { 577 const views::Widget::InitParams& params) {
576 return views::Widget::InitParams::OPAQUE_WINDOW; 578 return views::Widget::InitParams::OPAQUE_WINDOW;
577 } 579 }
578 #endif 580 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698