OLD | NEW |
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_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_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 13 matching lines...) Expand all Loading... |
24 #include "ui/base/touch/touch_factory_x11.h" | 24 #include "ui/base/touch/touch_factory_x11.h" |
25 #include "ui/base/x/x11_util.h" | 25 #include "ui/base/x/x11_util.h" |
26 #include "ui/gfx/insets.h" | 26 #include "ui/gfx/insets.h" |
27 #include "ui/gfx/path_x11.h" | 27 #include "ui/gfx/path_x11.h" |
28 #include "ui/linux_ui/linux_ui.h" | 28 #include "ui/linux_ui/linux_ui.h" |
29 #include "ui/native_theme/native_theme.h" | 29 #include "ui/native_theme/native_theme.h" |
30 #include "ui/views/corewm/compound_event_filter.h" | 30 #include "ui/views/corewm/compound_event_filter.h" |
31 #include "ui/views/corewm/corewm_switches.h" | 31 #include "ui/views/corewm/corewm_switches.h" |
32 #include "ui/views/corewm/cursor_manager.h" | 32 #include "ui/views/corewm/cursor_manager.h" |
33 #include "ui/views/corewm/focus_controller.h" | 33 #include "ui/views/corewm/focus_controller.h" |
34 #include "ui/views/ime/input_method.h" | |
35 #include "ui/views/widget/desktop_aura/desktop_activation_client.h" | 34 #include "ui/views/widget/desktop_aura/desktop_activation_client.h" |
36 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater_aurax11.h" | 35 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater_aurax11.h" |
37 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" | 36 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" |
38 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" | 37 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" |
39 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h" | 38 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h" |
40 #include "ui/views/widget/desktop_aura/desktop_layout_manager.h" | 39 #include "ui/views/widget/desktop_aura/desktop_layout_manager.h" |
41 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" | 40 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" |
42 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 41 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
43 #include "ui/views/widget/desktop_aura/desktop_root_window_host_observer_x11.h" | 42 #include "ui/views/widget/desktop_aura/desktop_root_window_host_observer_x11.h" |
44 #include "ui/views/widget/desktop_aura/desktop_screen_position_client.h" | 43 #include "ui/views/widget/desktop_aura/desktop_screen_position_client.h" |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 void DesktopRootWindowHostX11::InitModalType(ui::ModalType modal_type) { | 521 void DesktopRootWindowHostX11::InitModalType(ui::ModalType modal_type) { |
523 // TODO(erg): | 522 // TODO(erg): |
524 NOTIMPLEMENTED(); | 523 NOTIMPLEMENTED(); |
525 } | 524 } |
526 | 525 |
527 void DesktopRootWindowHostX11::FlashFrame(bool flash_frame) { | 526 void DesktopRootWindowHostX11::FlashFrame(bool flash_frame) { |
528 // TODO(erg): | 527 // TODO(erg): |
529 NOTIMPLEMENTED(); | 528 NOTIMPLEMENTED(); |
530 } | 529 } |
531 | 530 |
532 void DesktopRootWindowHostX11::OnNativeWidgetFocus() { | |
533 native_widget_delegate_->AsWidget()->GetInputMethod()->OnFocus(); | |
534 } | |
535 | |
536 void DesktopRootWindowHostX11::OnNativeWidgetBlur() { | |
537 if (xwindow_) | |
538 native_widget_delegate_->AsWidget()->GetInputMethod()->OnBlur(); | |
539 } | |
540 | |
541 //////////////////////////////////////////////////////////////////////////////// | 531 //////////////////////////////////////////////////////////////////////////////// |
542 // DesktopRootWindowHostX11, aura::RootWindowHost implementation: | 532 // DesktopRootWindowHostX11, aura::RootWindowHost implementation: |
543 | 533 |
544 void DesktopRootWindowHostX11::SetDelegate( | 534 void DesktopRootWindowHostX11::SetDelegate( |
545 aura::RootWindowHostDelegate* delegate) { | 535 aura::RootWindowHostDelegate* delegate) { |
546 root_window_host_delegate_ = delegate; | 536 root_window_host_delegate_ = delegate; |
547 } | 537 } |
548 | 538 |
549 aura::RootWindow* DesktopRootWindowHostX11::GetRootWindow() { | 539 aura::RootWindow* DesktopRootWindowHostX11::GetRootWindow() { |
550 return root_window_; | 540 return root_window_; |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 if (linux_ui) { | 1326 if (linux_ui) { |
1337 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); | 1327 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); |
1338 if (native_theme) | 1328 if (native_theme) |
1339 return native_theme; | 1329 return native_theme; |
1340 } | 1330 } |
1341 | 1331 |
1342 return ui::NativeTheme::instance(); | 1332 return ui::NativeTheme::instance(); |
1343 } | 1333 } |
1344 | 1334 |
1345 } // namespace views | 1335 } // namespace views |
OLD | NEW |