| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 std::unique_ptr<DictionaryPrefUpdate> pref_update = | 81 std::unique_ptr<DictionaryPrefUpdate> pref_update = |
| 82 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs); | 82 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs); |
| 83 base::DictionaryValue* window_preferences = pref_update->Get(); | 83 base::DictionaryValue* window_preferences = pref_update->Get(); |
| 84 window_preferences->SetInteger("left", bounds.x()); | 84 window_preferences->SetInteger("left", bounds.x()); |
| 85 window_preferences->SetInteger("top", bounds.y()); | 85 window_preferences->SetInteger("top", bounds.y()); |
| 86 window_preferences->SetInteger("right", bounds.right()); | 86 window_preferences->SetInteger("right", bounds.right()); |
| 87 window_preferences->SetInteger("bottom", bounds.bottom()); | 87 window_preferences->SetInteger("bottom", bounds.bottom()); |
| 88 window_preferences->SetBoolean("maximized", | 88 window_preferences->SetBoolean("maximized", |
| 89 show_state == ui::SHOW_STATE_MAXIMIZED); | 89 show_state == ui::SHOW_STATE_MAXIMIZED); |
| 90 // TODO(afakhry): Remove Docked Windows in M58. | |
| 91 window_preferences->SetBoolean("docked", show_state == ui::SHOW_STATE_DOCKED); | |
| 92 | 90 |
| 93 gfx::Rect work_area(display::Screen::GetScreen() | 91 gfx::Rect work_area(display::Screen::GetScreen() |
| 94 ->GetDisplayNearestWindow(window->GetNativeView()) | 92 ->GetDisplayNearestWindow(window->GetNativeView()) |
| 95 .work_area()); | 93 .work_area()); |
| 96 window_preferences->SetInteger("work_area_left", work_area.x()); | 94 window_preferences->SetInteger("work_area_left", work_area.x()); |
| 97 window_preferences->SetInteger("work_area_top", work_area.y()); | 95 window_preferences->SetInteger("work_area_top", work_area.y()); |
| 98 window_preferences->SetInteger("work_area_right", work_area.right()); | 96 window_preferences->SetInteger("work_area_right", work_area.right()); |
| 99 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); | 97 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); |
| 100 } | 98 } |
| 101 | 99 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); | 248 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); |
| 251 } | 249 } |
| 252 | 250 |
| 253 #if !defined(OS_CHROMEOS) | 251 #if !defined(OS_CHROMEOS) |
| 254 views::Widget::InitParams::WindowOpacity | 252 views::Widget::InitParams::WindowOpacity |
| 255 ChromeViewsDelegate::GetOpacityForInitParams( | 253 ChromeViewsDelegate::GetOpacityForInitParams( |
| 256 const views::Widget::InitParams& params) { | 254 const views::Widget::InitParams& params) { |
| 257 return views::Widget::InitParams::OPAQUE_WINDOW; | 255 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 258 } | 256 } |
| 259 #endif | 257 #endif |
| OLD | NEW |