| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. | 90 // TODO(afakhry): Remove Docked Windows in M58. |
| 91 window_preferences->SetBoolean("docked", show_state == ui::SHOW_STATE_DOCKED); | 91 window_preferences->SetBoolean("docked", show_state == ui::SHOW_STATE_DOCKED); |
| 92 | 92 |
| 93 gfx::Rect work_area(display::Screen::GetScreen() | 93 gfx::Rect work_area(display::Screen::GetScreen() |
| 94 ->GetDisplayNearestWindow(window->GetNativeView()) | 94 ->GetDisplayNearestView(window->GetNativeView()) |
| 95 .work_area()); | 95 .work_area()); |
| 96 window_preferences->SetInteger("work_area_left", work_area.x()); | 96 window_preferences->SetInteger("work_area_left", work_area.x()); |
| 97 window_preferences->SetInteger("work_area_top", work_area.y()); | 97 window_preferences->SetInteger("work_area_top", work_area.y()); |
| 98 window_preferences->SetInteger("work_area_right", work_area.right()); | 98 window_preferences->SetInteger("work_area_right", work_area.right()); |
| 99 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); | 99 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 bool ChromeViewsDelegate::GetSavedWindowPlacement( | 102 bool ChromeViewsDelegate::GetSavedWindowPlacement( |
| 103 const views::Widget* widget, | 103 const views::Widget* widget, |
| 104 const std::string& window_name, | 104 const std::string& window_name, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); | 250 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); |
| 251 } | 251 } |
| 252 | 252 |
| 253 #if !defined(OS_CHROMEOS) | 253 #if !defined(OS_CHROMEOS) |
| 254 views::Widget::InitParams::WindowOpacity | 254 views::Widget::InitParams::WindowOpacity |
| 255 ChromeViewsDelegate::GetOpacityForInitParams( | 255 ChromeViewsDelegate::GetOpacityForInitParams( |
| 256 const views::Widget::InitParams& params) { | 256 const views::Widget::InitParams& params) { |
| 257 return views::Widget::InitParams::OPAQUE_WINDOW; | 257 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 258 } | 258 } |
| 259 #endif | 259 #endif |
| OLD | NEW |