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

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

Issue 12315139: Sort out build dependencies for LinuxUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/views.gyp ('k') | no next file » | 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_root_window_host_linux.h" 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_linux.h"
6 6
7 #include <X11/extensions/XInput2.h> 7 #include <X11/extensions/XInput2.h>
8 #include <X11/Xatom.h> 8 #include <X11/Xatom.h>
9 #include <X11/Xutil.h> 9 #include <X11/Xutil.h>
10 10
11 #include "base/message_pump_aurax11.h" 11 #include "base/message_pump_aurax11.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "ui/aura/client/default_capture_client.h" 14 #include "ui/aura/client/default_capture_client.h"
15 #include "ui/aura/client/screen_position_client.h" 15 #include "ui/aura/client/screen_position_client.h"
16 #include "ui/aura/client/user_action_client.h" 16 #include "ui/aura/client/user_action_client.h"
17 #include "ui/aura/focus_manager.h" 17 #include "ui/aura/focus_manager.h"
18 #include "ui/aura/root_window.h" 18 #include "ui/aura/root_window.h"
19 #include "ui/aura/window_property.h" 19 #include "ui/aura/window_property.h"
20 #include "ui/base/events/event_utils.h" 20 #include "ui/base/events/event_utils.h"
21 #include "ui/base/touch/touch_factory.h" 21 #include "ui/base/touch/touch_factory.h"
22 #include "ui/base/x/x11_util.h" 22 #include "ui/base/x/x11_util.h"
23 #include "ui/linux_ui/linux_ui.h"
23 #include "ui/native_theme/native_theme.h" 24 #include "ui/native_theme/native_theme.h"
24 #include "ui/views/corewm/compound_event_filter.h" 25 #include "ui/views/corewm/compound_event_filter.h"
25 #include "ui/views/corewm/corewm_switches.h" 26 #include "ui/views/corewm/corewm_switches.h"
26 #include "ui/views/corewm/cursor_manager.h" 27 #include "ui/views/corewm/cursor_manager.h"
27 #include "ui/views/corewm/focus_controller.h" 28 #include "ui/views/corewm/focus_controller.h"
28 #include "ui/views/ime/input_method.h" 29 #include "ui/views/ime/input_method.h"
29 #include "ui/views/widget/desktop_aura/desktop_activation_client.h" 30 #include "ui/views/widget/desktop_aura/desktop_activation_client.h"
30 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" 31 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h"
31 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h" 32 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h"
32 #include "ui/views/widget/desktop_aura/desktop_layout_manager.h" 33 #include "ui/views/widget/desktop_aura/desktop_layout_manager.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 DesktopRootWindowHostLinux::~DesktopRootWindowHostLinux() { 96 DesktopRootWindowHostLinux::~DesktopRootWindowHostLinux() {
96 root_window_->ClearProperty(kHostForRootWindow); 97 root_window_->ClearProperty(kHostForRootWindow);
97 if (corewm::UseFocusControllerOnDesktop()) { 98 if (corewm::UseFocusControllerOnDesktop()) {
98 aura::client::SetFocusClient(root_window_, NULL); 99 aura::client::SetFocusClient(root_window_, NULL);
99 aura::client::SetActivationClient(root_window_, NULL); 100 aura::client::SetActivationClient(root_window_, NULL);
100 } 101 }
101 } 102 }
102 103
103 // static 104 // static
104 ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) { 105 ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) {
106 const ui::LinuxUI* linux_ui = ui::LinuxUI::instance();
107 if (linux_ui) {
108 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme();
109 if (native_theme)
110 return native_theme;
111 }
112
105 return ui::NativeTheme::instance(); 113 return ui::NativeTheme::instance();
106 } 114 }
107 115
108 //////////////////////////////////////////////////////////////////////////////// 116 ////////////////////////////////////////////////////////////////////////////////
109 // DesktopRootWindowHostLinux, private: 117 // DesktopRootWindowHostLinux, private:
110 118
111 void DesktopRootWindowHostLinux::InitX11Window( 119 void DesktopRootWindowHostLinux::InitX11Window(
112 const Widget::InitParams& params) { 120 const Widget::InitParams& params) {
113 unsigned long attribute_mask = CWBackPixmap; 121 unsigned long attribute_mask = CWBackPixmap;
114 XSetWindowAttributes swa; 122 XSetWindowAttributes swa;
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 DesktopRootWindowHost* DesktopRootWindowHost::Create( 1130 DesktopRootWindowHost* DesktopRootWindowHost::Create(
1123 internal::NativeWidgetDelegate* native_widget_delegate, 1131 internal::NativeWidgetDelegate* native_widget_delegate,
1124 DesktopNativeWidgetAura* desktop_native_widget_aura, 1132 DesktopNativeWidgetAura* desktop_native_widget_aura,
1125 const gfx::Rect& initial_bounds) { 1133 const gfx::Rect& initial_bounds) {
1126 return new DesktopRootWindowHostLinux(native_widget_delegate, 1134 return new DesktopRootWindowHostLinux(native_widget_delegate,
1127 desktop_native_widget_aura, 1135 desktop_native_widget_aura,
1128 initial_bounds); 1136 initial_bounds);
1129 } 1137 }
1130 1138
1131 } // namespace views 1139 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698