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

Side by Side Diff: ui/ozone/common/display_util.cc

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
« no previous file with comments | « ui/native_theme/native_theme_switches.cc ('k') | ui/ozone/demo/ozone_demo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/ozone/common/display_util.h" 5 #include "ui/ozone/common/display_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "ui/display/types/display_mode.h" 8 #include "ui/display/types/display_mode.h"
9 #include "ui/display/types/display_snapshot.h" 9 #include "ui/display/types/display_snapshot.h"
10 #include "ui/ozone/public/ozone_switches.h" 10 #include "ui/ozone/public/ozone_switches.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 params.native_mode = GetDisplayModeParams(*display.native_mode()); 55 params.native_mode = GetDisplayModeParams(*display.native_mode());
56 56
57 params.string_representation = display.ToString(); 57 params.string_representation = display.ToString();
58 58
59 return params; 59 return params;
60 } 60 }
61 61
62 DisplaySnapshot_Params CreateSnapshotFromCommandLine() { 62 DisplaySnapshot_Params CreateSnapshotFromCommandLine() {
63 DisplaySnapshot_Params display_param; 63 DisplaySnapshot_Params display_param;
64 64
65 CommandLine* cmd = CommandLine::ForCurrentProcess(); 65 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
66 std::string spec = 66 std::string spec =
67 cmd->GetSwitchValueASCII(switches::kOzoneInitialDisplayBounds); 67 cmd->GetSwitchValueASCII(switches::kOzoneInitialDisplayBounds);
68 std::string physical_spec = 68 std::string physical_spec =
69 cmd->GetSwitchValueASCII(switches::kOzoneInitialDisplayPhysicalSizeMm); 69 cmd->GetSwitchValueASCII(switches::kOzoneInitialDisplayPhysicalSizeMm);
70 70
71 if (spec.empty()) 71 if (spec.empty())
72 return display_param; 72 return display_param;
73 73
74 int width = 0; 74 int width = 0;
75 int height = 0; 75 int height = 0;
(...skipping 17 matching lines...) Expand all
93 display_param.physical_size = gfx::Size(physical_width, physical_height); 93 display_param.physical_size = gfx::Size(physical_width, physical_height);
94 display_param.has_current_mode = true; 94 display_param.has_current_mode = true;
95 display_param.current_mode = mode_param; 95 display_param.current_mode = mode_param;
96 display_param.has_native_mode = true; 96 display_param.has_native_mode = true;
97 display_param.native_mode = mode_param; 97 display_param.native_mode = mode_param;
98 98
99 return display_param; 99 return display_param;
100 } 100 }
101 101
102 } // namespace ui 102 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_switches.cc ('k') | ui/ozone/demo/ozone_demo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698