| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |