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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import "base/auto_reset.h" 9 #import "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 // Only save main window information to preferences. 161 // Only save main window information to preferences.
162 PrefService* prefs = browser_->profile()->GetPrefs(); 162 PrefService* prefs = browser_->profile()->GetPrefs();
163 if (!prefs || browser_.get() != chrome::GetLastActiveBrowser()) 163 if (!prefs || browser_.get() != chrome::GetLastActiveBrowser())
164 return; 164 return;
165 165
166 // Save the current work area, in flipped coordinates. 166 // Save the current work area, in flipped coordinates.
167 gfx::Rect workArea(NSRectToCGRect([windowScreen visibleFrame])); 167 gfx::Rect workArea(NSRectToCGRect([windowScreen visibleFrame]));
168 workArea.set_y(monitorFrame.size.height - workArea.y() - workArea.height()); 168 workArea.set_y(monitorFrame.size.height - workArea.y() - workArea.height());
169 169
170 scoped_ptr<DictionaryPrefUpdate> update = 170 std::unique_ptr<DictionaryPrefUpdate> update =
171 chrome::GetWindowPlacementDictionaryReadWrite( 171 chrome::GetWindowPlacementDictionaryReadWrite(
172 chrome::GetWindowName(browser_.get()), 172 chrome::GetWindowName(browser_.get()),
173 browser_->profile()->GetPrefs()); 173 browser_->profile()->GetPrefs());
174 base::DictionaryValue* windowPreferences = update->Get(); 174 base::DictionaryValue* windowPreferences = update->Get();
175 windowPreferences->SetInteger("left", bounds.x()); 175 windowPreferences->SetInteger("left", bounds.x());
176 windowPreferences->SetInteger("top", bounds.y()); 176 windowPreferences->SetInteger("top", bounds.y());
177 windowPreferences->SetInteger("right", bounds.right()); 177 windowPreferences->SetInteger("right", bounds.right());
178 windowPreferences->SetInteger("bottom", bounds.bottom()); 178 windowPreferences->SetInteger("bottom", bounds.bottom());
179 windowPreferences->SetBoolean("maximized", false); 179 windowPreferences->SetBoolean("maximized", false);
180 windowPreferences->SetBoolean("always_on_top", false); 180 windowPreferences->SetBoolean("always_on_top", false);
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 return nil; 1223 return nil;
1224 } 1224 }
1225 1225
1226 - (BOOL)isFullscreenForTabContent { 1226 - (BOOL)isFullscreenForTabContent {
1227 return browser_->exclusive_access_manager() 1227 return browser_->exclusive_access_manager()
1228 ->fullscreen_controller() 1228 ->fullscreen_controller()
1229 ->IsWindowFullscreenForTabOrPending(); 1229 ->IsWindowFullscreenForTabOrPending();
1230 } 1230 }
1231 1231
1232 @end // @implementation BrowserWindowController(Private) 1232 @end // @implementation BrowserWindowController(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698