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

Side by Side Diff: chrome/browser/chromeos/login/helper.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 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/chromeos/login/helper.h" 5 #include "chrome/browser/chromeos/login/helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 return guest_contents ? content::BrowserContext::GetStoragePartition( 81 return guest_contents ? content::BrowserContext::GetStoragePartition(
82 guest_contents->GetBrowserContext(), 82 guest_contents->GetBrowserContext(),
83 guest_contents->GetSiteInstance()) 83 guest_contents->GetSiteInstance())
84 : nullptr; 84 : nullptr;
85 } 85 }
86 86
87 } // namespace 87 } // namespace
88 88
89 gfx::Rect CalculateScreenBounds(const gfx::Size& size) { 89 gfx::Rect CalculateScreenBounds(const gfx::Size& size) {
90 gfx::Rect bounds = 90 gfx::Rect bounds = gfx::Screen::GetScreen()->GetPrimaryDisplay().bounds();
91 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().bounds();
92 if (!size.IsEmpty()) { 91 if (!size.IsEmpty()) {
93 int horizontal_diff = bounds.width() - size.width(); 92 int horizontal_diff = bounds.width() - size.width();
94 int vertical_diff = bounds.height() - size.height(); 93 int vertical_diff = bounds.height() - size.height();
95 bounds.Inset(horizontal_diff / 2, vertical_diff / 2); 94 bounds.Inset(horizontal_diff / 2, vertical_diff / 2);
96 } 95 }
97 return bounds; 96 return bounds;
98 } 97 }
99 98
100 int GetCurrentUserImageSize() { 99 int GetCurrentUserImageSize() {
101 // The biggest size that the profile picture is displayed at is currently 100 // The biggest size that the profile picture is displayed at is currently
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 242
244 return signin_partition->GetURLRequestContext(); 243 return signin_partition->GetURLRequestContext();
245 } 244 }
246 245
247 return ProfileHelper::GetSigninProfile()->GetRequestContext(); 246 return ProfileHelper::GetSigninProfile()->GetRequestContext();
248 } 247 }
249 248
250 } // namespace login 249 } // namespace login
251 250
252 } // namespace chromeos 251 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698