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

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

Issue 12746002: Re-implement overscan & Implement Display Rotation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
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/gfx/insets.h"
23 #include "ui/linux_ui/linux_ui.h" 24 #include "ui/linux_ui/linux_ui.h"
24 #include "ui/native_theme/native_theme.h" 25 #include "ui/native_theme/native_theme.h"
25 #include "ui/views/corewm/compound_event_filter.h" 26 #include "ui/views/corewm/compound_event_filter.h"
26 #include "ui/views/corewm/corewm_switches.h" 27 #include "ui/views/corewm/corewm_switches.h"
27 #include "ui/views/corewm/cursor_manager.h" 28 #include "ui/views/corewm/cursor_manager.h"
28 #include "ui/views/corewm/focus_controller.h" 29 #include "ui/views/corewm/focus_controller.h"
29 #include "ui/views/ime/input_method.h" 30 #include "ui/views/ime/input_method.h"
30 #include "ui/views/widget/desktop_aura/desktop_activation_client.h" 31 #include "ui/views/widget/desktop_aura/desktop_activation_client.h"
31 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" 32 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h"
32 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h" 33 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h"
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 bounds_ = bounds; 718 bounds_ = bounds;
718 719
719 if (origin_changed) 720 if (origin_changed)
720 native_widget_delegate_->AsWidget()->OnNativeWidgetMove(); 721 native_widget_delegate_->AsWidget()->OnNativeWidgetMove();
721 if (size_changed) 722 if (size_changed)
722 root_window_host_delegate_->OnHostResized(bounds.size()); 723 root_window_host_delegate_->OnHostResized(bounds.size());
723 else 724 else
724 root_window_host_delegate_->OnHostPaint(); 725 root_window_host_delegate_->OnHostPaint();
725 } 726 }
726 727
728 gfx::Insets DesktopRootWindowHostLinux::GetInsets() const {
729 return gfx::Insets();
730 }
731
732 void DesktopRootWindowHostLinux::SetInsets(const gfx::Insets& insets) {
733 }
734
727 gfx::Point DesktopRootWindowHostLinux::GetLocationOnNativeScreen() const { 735 gfx::Point DesktopRootWindowHostLinux::GetLocationOnNativeScreen() const {
728 return bounds_.origin(); 736 return bounds_.origin();
729 } 737 }
730 738
731 void DesktopRootWindowHostLinux::SetCapture() { 739 void DesktopRootWindowHostLinux::SetCapture() {
732 // This is vaguely based on the old NativeWidgetGtk implementation. 740 // This is vaguely based on the old NativeWidgetGtk implementation.
733 // 741 //
734 // X11's XPointerGrab() shouldn't be used for everything; it doesn't map 742 // X11's XPointerGrab() shouldn't be used for everything; it doesn't map
735 // cleanly to Windows' SetCapture(). GTK only provides a separate concept of 743 // cleanly to Windows' SetCapture(). GTK only provides a separate concept of
736 // a grab that wasn't the X11 pointer grab, but was instead a manual 744 // a grab that wasn't the X11 pointer grab, but was instead a manual
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 DesktopRootWindowHost* DesktopRootWindowHost::Create( 1121 DesktopRootWindowHost* DesktopRootWindowHost::Create(
1114 internal::NativeWidgetDelegate* native_widget_delegate, 1122 internal::NativeWidgetDelegate* native_widget_delegate,
1115 DesktopNativeWidgetAura* desktop_native_widget_aura, 1123 DesktopNativeWidgetAura* desktop_native_widget_aura,
1116 const gfx::Rect& initial_bounds) { 1124 const gfx::Rect& initial_bounds) {
1117 return new DesktopRootWindowHostLinux(native_widget_delegate, 1125 return new DesktopRootWindowHostLinux(native_widget_delegate,
1118 desktop_native_widget_aura, 1126 desktop_native_widget_aura,
1119 initial_bounds); 1127 initial_bounds);
1120 } 1128 }
1121 1129
1122 } // namespace views 1130 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698