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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.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/views/views_switches.cc ('k') | ui/views/widget/widget_interactive_uitest.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 (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 "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 window_type = atom_cache_.GetAtom("_NET_WM_WINDOW_TYPE_NORMAL"); 1027 window_type = atom_cache_.GetAtom("_NET_WM_WINDOW_TYPE_NORMAL");
1028 break; 1028 break;
1029 } 1029 }
1030 if (swa.override_redirect) 1030 if (swa.override_redirect)
1031 attribute_mask |= CWOverrideRedirect; 1031 attribute_mask |= CWOverrideRedirect;
1032 1032
1033 // Detect whether we're running inside a compositing manager. If so, try to 1033 // Detect whether we're running inside a compositing manager. If so, try to
1034 // use the ARGB visual. Otherwise, just use our parent's visual. 1034 // use the ARGB visual. Otherwise, just use our parent's visual.
1035 Visual* visual = CopyFromParent; 1035 Visual* visual = CopyFromParent;
1036 int depth = CopyFromParent; 1036 int depth = CopyFromParent;
1037 if (CommandLine::ForCurrentProcess()->HasSwitch( 1037 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1038 switches::kEnableTransparentVisuals) && 1038 switches::kEnableTransparentVisuals) &&
1039 XGetSelectionOwner(xdisplay_, 1039 XGetSelectionOwner(xdisplay_, atom_cache_.GetAtom("_NET_WM_CM_S0")) !=
1040 atom_cache_.GetAtom("_NET_WM_CM_S0")) != None) { 1040 None) {
1041 Visual* rgba_visual = GetARGBVisual(); 1041 Visual* rgba_visual = GetARGBVisual();
1042 if (rgba_visual) { 1042 if (rgba_visual) {
1043 visual = rgba_visual; 1043 visual = rgba_visual;
1044 depth = 32; 1044 depth = 32;
1045 1045
1046 attribute_mask |= CWColormap; 1046 attribute_mask |= CWColormap;
1047 swa.colormap = XCreateColormap(xdisplay_, x_root_window_, visual, 1047 swa.colormap = XCreateColormap(xdisplay_, x_root_window_, visual,
1048 AllocNone); 1048 AllocNone);
1049 1049
1050 // x.org will BadMatch if we don't set a border when the depth isn't the 1050 // x.org will BadMatch if we don't set a border when the depth isn't the
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 if (linux_ui) { 1928 if (linux_ui) {
1929 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 1929 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
1930 if (native_theme) 1930 if (native_theme)
1931 return native_theme; 1931 return native_theme;
1932 } 1932 }
1933 1933
1934 return ui::NativeTheme::instance(); 1934 return ui::NativeTheme::instance();
1935 } 1935 }
1936 1936
1937 } // namespace views 1937 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/views_switches.cc ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698