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

Unified Diff: ui/gfx/icc_profile_x11.cc

Issue 1991953002: Implement a runtime headless mode for Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/ime/input_method_factory.cc ('k') | ui/gfx/switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icc_profile_x11.cc
diff --git a/ui/gfx/icc_profile_x11.cc b/ui/gfx/icc_profile_x11.cc
index 21ae82c20cb20c8679da66272662a26c915e590c..8bcd51e6fb911783b81caf655680926491d7c5ce 100644
--- a/ui/gfx/icc_profile_x11.cc
+++ b/ui/gfx/icc_profile_x11.cc
@@ -9,8 +9,9 @@ extern "C" {
#include <X11/Xlib.h>
}
+#include "base/command_line.h"
#include "ui/gfx/icc_profile.h"
-
+#include "ui/gfx/switches.h"
#include "ui/gfx/x/x11_types.h"
namespace gfx {
@@ -18,6 +19,8 @@ namespace gfx {
// static
ICCProfile ICCProfile::FromBestMonitor() {
ICCProfile icc_profile;
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kHeadless))
+ return icc_profile;
Atom property = XInternAtom(GetXDisplay(), "_ICC_PROFILE", true);
if (property != None) {
Atom prop_type = None;
« no previous file with comments | « ui/base/ime/input_method_factory.cc ('k') | ui/gfx/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698