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

Side by Side Diff: chrome/browser/chromeos/net/network_portal_web_dialog.cc

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/net/network_portal_web_dialog.h" 5 #include "chrome/browser/chromeos/net/network_portal_web_dialog.h"
6 6
7 #include "ash/shell.h"
8 #include "chrome/grit/generated_resources.h" 7 #include "chrome/grit/generated_resources.h"
9 #include "components/captive_portal/captive_portal_detector.h" 8 #include "components/captive_portal/captive_portal_detector.h"
10 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/base/ui_base_types.h" 10 #include "ui/base/ui_base_types.h"
12 #include "ui/gfx/display.h" 11 #include "ui/gfx/display.h"
13 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
13 #include "ui/gfx/screen.h"
14 #include "ui/views/widget/widget.h" 14 #include "ui/views/widget/widget.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace { 17 namespace {
18 18
19 const float kNetworkPortalWebDialogWidthFraction = .8; 19 const float kNetworkPortalWebDialogWidthFraction = .8;
20 const float kNetworkPortalWebDialogHeightFraction = .8; 20 const float kNetworkPortalWebDialogHeightFraction = .8;
21 21
22 gfx::Size GetPortalDialogSize() { 22 gfx::Size GetPortalDialogSize() {
23 const gfx::Display display = ash::Shell::GetScreen()->GetPrimaryDisplay(); 23 const gfx::Display display = gfx::Screen::GetScreen()->GetPrimaryDisplay();
24 24
25 gfx::Size display_size = display.size(); 25 gfx::Size display_size = display.size();
26 26
27 if (display.rotation() == gfx::Display::ROTATE_90 || 27 if (display.rotation() == gfx::Display::ROTATE_90 ||
28 display.rotation() == gfx::Display::ROTATE_270) { 28 display.rotation() == gfx::Display::ROTATE_270) {
29 display_size = gfx::Size(display_size.height(), display_size.width()); 29 display_size = gfx::Size(display_size.height(), display_size.width());
30 } 30 }
31 31
32 display_size = 32 display_size =
33 gfx::Size(display_size.width() * kNetworkPortalWebDialogWidthFraction, 33 gfx::Size(display_size.width() * kNetworkPortalWebDialogWidthFraction,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void NetworkPortalWebDialog::OnCloseContents(content::WebContents* /* source */, 95 void NetworkPortalWebDialog::OnCloseContents(content::WebContents* /* source */,
96 bool* out_close_dialog) { 96 bool* out_close_dialog) {
97 *out_close_dialog = true; 97 *out_close_dialog = true;
98 } 98 }
99 99
100 bool NetworkPortalWebDialog::ShouldShowDialogTitle() const { 100 bool NetworkPortalWebDialog::ShouldShowDialogTitle() const {
101 return true; 101 return true;
102 } 102 }
103 103
104 } // namespace chromeos 104 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/login_display_host_impl.cc ('k') | chrome/browser/extensions/display_info_provider_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698