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

Side by Side Diff: ash/host/ash_window_tree_host_x11.cc

Issue 989993002: x11: Use scoped_ptr<> for X11 objects where it makes sense. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 9 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 | « no previous file | ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.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 "ash/host/ash_window_tree_host_x11.h" 5 #include "ash/host/ash_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/Xfixes.h> 7 #include <X11/extensions/Xfixes.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/Xlib.h> 10 #include <X11/Xlib.h>
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 SendEventToProcessor(event); 240 SendEventToProcessor(event);
241 } 241 }
242 242
243 #if defined(OS_CHROMEOS) 243 #if defined(OS_CHROMEOS)
244 void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) { 244 void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) {
245 if (!ui::IsXInput2Available()) 245 if (!ui::IsXInput2Available())
246 return; 246 return;
247 // Temporarily pause tap-to-click when the cursor is hidden. 247 // Temporarily pause tap-to-click when the cursor is hidden.
248 Atom prop = atom_cache()->GetAtom("Tap Paused"); 248 Atom prop = atom_cache()->GetAtom("Tap Paused");
249 unsigned char value = state; 249 unsigned char value = state;
250 XIDeviceList dev_list = 250 const XIDeviceList& dev_list =
251 ui::DeviceListCacheX11::GetInstance()->GetXI2DeviceList(xdisplay()); 251 ui::DeviceListCacheX11::GetInstance()->GetXI2DeviceList(xdisplay());
252 252
253 // Only slave pointer devices could possibly have tap-paused property. 253 // Only slave pointer devices could possibly have tap-paused property.
254 for (int i = 0; i < dev_list.count; i++) { 254 for (int i = 0; i < dev_list.count; i++) {
255 if (dev_list[i].use == XISlavePointer) { 255 if (dev_list[i].use == XISlavePointer) {
256 Atom old_type; 256 Atom old_type;
257 int old_format; 257 int old_format;
258 unsigned long old_nvalues, bytes; 258 unsigned long old_nvalues, bytes;
259 unsigned char* data; 259 unsigned char* data;
260 int result = XIGetProperty(xdisplay(), 260 int result = XIGetProperty(xdisplay(),
(...skipping 23 matching lines...) Expand all
284 } 284 }
285 } 285 }
286 #endif 286 #endif
287 287
288 AshWindowTreeHost* AshWindowTreeHost::Create( 288 AshWindowTreeHost* AshWindowTreeHost::Create(
289 const AshWindowTreeHostInitParams& init_params) { 289 const AshWindowTreeHostInitParams& init_params) {
290 return new AshWindowTreeHostX11(init_params.initial_bounds); 290 return new AshWindowTreeHostX11(init_params.initial_bounds);
291 } 291 }
292 292
293 } // namespace ash 293 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698