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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2632543003: Refactor and push window properties up to class properties. (Closed)
Patch Set: Created 3 years, 11 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
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>
11 #include <X11/Xutil.h> 11 #include <X11/Xutil.h>
12 12
13 #include <utility> 13 #include <utility>
14 14
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/location.h" 16 #include "base/location.h"
17 #include "base/memory/ptr_util.h" 17 #include "base/memory/ptr_util.h"
18 #include "base/single_thread_task_runner.h" 18 #include "base/single_thread_task_runner.h"
19 #include "base/strings/string_number_conversions.h" 19 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/stringprintf.h" 20 #include "base/strings/stringprintf.h"
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/threading/thread_task_runner_handle.h" 22 #include "base/threading/thread_task_runner_handle.h"
23 #include "base/trace_event/trace_event.h" 23 #include "base/trace_event/trace_event.h"
24 #include "third_party/skia/include/core/SkPath.h" 24 #include "third_party/skia/include/core/SkPath.h"
25 #include "ui/aura/client/cursor_client.h" 25 #include "ui/aura/client/cursor_client.h"
26 #include "ui/aura/client/focus_client.h" 26 #include "ui/aura/client/focus_client.h"
27 #include "ui/aura/window.h" 27 #include "ui/aura/window.h"
28 #include "ui/aura/window_event_dispatcher.h" 28 #include "ui/aura/window_event_dispatcher.h"
29 #include "ui/aura/window_property.h" 29 #include "ui/base/class_property.h"
30 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" 30 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h"
31 #include "ui/base/hit_test.h" 31 #include "ui/base/hit_test.h"
32 #include "ui/base/ime/input_method.h" 32 #include "ui/base/ime/input_method.h"
33 #include "ui/base/x/x11_util.h" 33 #include "ui/base/x/x11_util.h"
34 #include "ui/base/x/x11_util_internal.h" 34 #include "ui/base/x/x11_util_internal.h"
35 #include "ui/base/x/x11_window_event_manager.h" 35 #include "ui/base/x/x11_window_event_manager.h"
36 #include "ui/display/display.h" 36 #include "ui/display/display.h"
37 #include "ui/display/screen.h" 37 #include "ui/display/screen.h"
38 #include "ui/events/devices/x11/device_data_manager_x11.h" 38 #include "ui/events/devices/x11/device_data_manager_x11.h"
39 #include "ui/events/devices/x11/device_list_cache_x11.h" 39 #include "ui/events/devices/x11/device_list_cache_x11.h"
(...skipping 17 matching lines...) Expand all
57 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 57 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
58 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_observer_x11.h" 58 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_observer_x11.h"
59 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" 59 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
60 #include "ui/views/widget/desktop_aura/x11_desktop_window_move_client.h" 60 #include "ui/views/widget/desktop_aura/x11_desktop_window_move_client.h"
61 #include "ui/views/widget/desktop_aura/x11_pointer_grab.h" 61 #include "ui/views/widget/desktop_aura/x11_pointer_grab.h"
62 #include "ui/views/widget/desktop_aura/x11_window_event_filter.h" 62 #include "ui/views/widget/desktop_aura/x11_window_event_filter.h"
63 #include "ui/views/window/native_frame_view.h" 63 #include "ui/views/window/native_frame_view.h"
64 #include "ui/wm/core/compound_event_filter.h" 64 #include "ui/wm/core/compound_event_filter.h"
65 #include "ui/wm/core/window_util.h" 65 #include "ui/wm/core/window_util.h"
66 66
67 DECLARE_WINDOW_PROPERTY_TYPE(views::DesktopWindowTreeHostX11*); 67 DECLARE_CLASS_PROPERTY_TYPE(views::DesktopWindowTreeHostX11*);
68 68
69 namespace views { 69 namespace views {
70 70
71 DesktopWindowTreeHostX11* DesktopWindowTreeHostX11::g_current_capture = 71 DesktopWindowTreeHostX11* DesktopWindowTreeHostX11::g_current_capture =
72 NULL; 72 NULL;
73 std::list<XID>* DesktopWindowTreeHostX11::open_windows_ = NULL; 73 std::list<XID>* DesktopWindowTreeHostX11::open_windows_ = NULL;
74 74
75 DEFINE_WINDOW_PROPERTY_KEY( 75 DEFINE_CLASS_PROPERTY_KEY(
76 aura::Window*, kViewsWindowForRootWindow, NULL); 76 aura::Window*, kViewsWindowForRootWindow, NULL);
77 77
78 DEFINE_WINDOW_PROPERTY_KEY( 78 DEFINE_CLASS_PROPERTY_KEY(
79 DesktopWindowTreeHostX11*, kHostForRootWindow, NULL); 79 DesktopWindowTreeHostX11*, kHostForRootWindow, NULL);
80 80
81 namespace { 81 namespace {
82 82
83 // Constants that are part of EWMH. 83 // Constants that are part of EWMH.
84 const int k_NET_WM_STATE_ADD = 1; 84 const int k_NET_WM_STATE_ADD = 1;
85 const int k_NET_WM_STATE_REMOVE = 0; 85 const int k_NET_WM_STATE_REMOVE = 0;
86 86
87 // Special value of the _NET_WM_DESKTOP property which indicates that the window 87 // Special value of the _NET_WM_DESKTOP property which indicates that the window
88 // should appear on all desktops. 88 // should appear on all desktops.
(...skipping 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 2355
2356 // static 2356 // static
2357 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 2357 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
2358 internal::NativeWidgetDelegate* native_widget_delegate, 2358 internal::NativeWidgetDelegate* native_widget_delegate,
2359 DesktopNativeWidgetAura* desktop_native_widget_aura) { 2359 DesktopNativeWidgetAura* desktop_native_widget_aura) {
2360 return new DesktopWindowTreeHostX11(native_widget_delegate, 2360 return new DesktopWindowTreeHostX11(native_widget_delegate,
2361 desktop_native_widget_aura); 2361 desktop_native_widget_aura);
2362 } 2362 }
2363 2363
2364 } // namespace views 2364 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698