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

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

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase Created 3 years, 9 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/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 std::unique_ptr<DictionaryPrefUpdate> pref_update = 96 std::unique_ptr<DictionaryPrefUpdate> pref_update =
97 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs); 97 chrome::GetWindowPlacementDictionaryReadWrite(window_name, prefs);
98 base::DictionaryValue* window_preferences = pref_update->Get(); 98 base::DictionaryValue* window_preferences = pref_update->Get();
99 window_preferences->SetInteger("left", bounds.x()); 99 window_preferences->SetInteger("left", bounds.x());
100 window_preferences->SetInteger("top", bounds.y()); 100 window_preferences->SetInteger("top", bounds.y());
101 window_preferences->SetInteger("right", bounds.right()); 101 window_preferences->SetInteger("right", bounds.right());
102 window_preferences->SetInteger("bottom", bounds.bottom()); 102 window_preferences->SetInteger("bottom", bounds.bottom());
103 window_preferences->SetBoolean("maximized", 103 window_preferences->SetBoolean("maximized",
104 show_state == ui::SHOW_STATE_MAXIMIZED); 104 show_state == ui::SHOW_STATE_MAXIMIZED);
105 // TODO(afakhry): Remove Docked Windows in M58.
106 window_preferences->SetBoolean("docked", show_state == ui::SHOW_STATE_DOCKED);
107 105
108 gfx::Rect work_area(display::Screen::GetScreen() 106 gfx::Rect work_area(display::Screen::GetScreen()
109 ->GetDisplayNearestView(window->GetNativeView()) 107 ->GetDisplayNearestView(window->GetNativeView())
110 .work_area()); 108 .work_area());
111 window_preferences->SetInteger("work_area_left", work_area.x()); 109 window_preferences->SetInteger("work_area_left", work_area.x());
112 window_preferences->SetInteger("work_area_top", work_area.y()); 110 window_preferences->SetInteger("work_area_top", work_area.y());
113 window_preferences->SetInteger("work_area_right", work_area.right()); 111 window_preferences->SetInteger("work_area_right", work_area.right());
114 window_preferences->SetInteger("work_area_bottom", work_area.bottom()); 112 window_preferences->SetInteger("work_area_bottom", work_area.bottom());
115 } 113 }
116 114
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 return views::ViewsDelegate::GetDistanceMetric(metric); 278 return views::ViewsDelegate::GetDistanceMetric(metric);
281 } 279 }
282 280
283 #if !defined(OS_CHROMEOS) 281 #if !defined(OS_CHROMEOS)
284 views::Widget::InitParams::WindowOpacity 282 views::Widget::InitParams::WindowOpacity
285 ChromeViewsDelegate::GetOpacityForInitParams( 283 ChromeViewsDelegate::GetOpacityForInitParams(
286 const views::Widget::InitParams& params) { 284 const views::Widget::InitParams& params) {
287 return views::Widget::InitParams::OPAQUE_WINDOW; 285 return views::Widget::InitParams::OPAQUE_WINDOW;
288 } 286 }
289 #endif 287 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698