| OLD | NEW |
| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 std::unique_ptr<DictionaryPrefUpdate> pref_update = | 227 std::unique_ptr<DictionaryPrefUpdate> pref_update = |
| 228 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs); | 228 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs); |
| 229 base::DictionaryValue* window_preferences = pref_update->Get(); | 229 base::DictionaryValue* window_preferences = pref_update->Get(); |
| 230 window_preferences->SetInteger("left", bounds.x()); | 230 window_preferences->SetInteger("left", bounds.x()); |
| 231 window_preferences->SetInteger("top", bounds.y()); | 231 window_preferences->SetInteger("top", bounds.y()); |
| 232 window_preferences->SetInteger("right", bounds.right()); | 232 window_preferences->SetInteger("right", bounds.right()); |
| 233 window_preferences->SetInteger("bottom", bounds.bottom()); | 233 window_preferences->SetInteger("bottom", bounds.bottom()); |
| 234 window_preferences->SetBoolean("maximized", | 234 window_preferences->SetBoolean("maximized", |
| 235 show_state == ui::SHOW_STATE_MAXIMIZED); | 235 show_state == ui::SHOW_STATE_MAXIMIZED); |
| 236 // TODO(afakhry): Remove Docked Windows in M58. | |
| 237 window_preferences->SetBoolean("docked", show_state == ui::SHOW_STATE_DOCKED); | |
| 238 | 236 |
| 239 gfx::Rect work_area(display::Screen::GetScreen() | 237 gfx::Rect work_area(display::Screen::GetScreen() |
| 240 ->GetDisplayNearestWindow(window->GetNativeView()) | 238 ->GetDisplayNearestWindow(window->GetNativeView()) |
| 241 .work_area()); | 239 .work_area()); |
| 242 window_preferences->SetInteger("work_area_left", work_area.x()); | 240 window_preferences->SetInteger("work_area_left", work_area.x()); |
| 243 window_preferences->SetInteger("work_area_top", work_area.y()); | 241 window_preferences->SetInteger("work_area_top", work_area.y()); |
| 244 window_preferences->SetInteger("work_area_right", work_area.right()); | 242 window_preferences->SetInteger("work_area_right", work_area.right()); |
| 245 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); | 243 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); |
| 246 } | 244 } |
| 247 | 245 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); | 596 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); |
| 599 } | 597 } |
| 600 | 598 |
| 601 #if !defined(USE_ASH) | 599 #if !defined(USE_ASH) |
| 602 views::Widget::InitParams::WindowOpacity | 600 views::Widget::InitParams::WindowOpacity |
| 603 ChromeViewsDelegate::GetOpacityForInitParams( | 601 ChromeViewsDelegate::GetOpacityForInitParams( |
| 604 const views::Widget::InitParams& params) { | 602 const views::Widget::InitParams& params) { |
| 605 return views::Widget::InitParams::OPAQUE_WINDOW; | 603 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 606 } | 604 } |
| 607 #endif | 605 #endif |
| OLD | NEW |