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

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

Issue 56053005: linux_aura: Improve window drag performance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 7 years, 1 month 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/base/x/x11_util.cc ('k') | ui/views/widget/desktop_aura/desktop_root_window_host_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 (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_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h"
8 #include "ui/aura/client/activation_client.h" 9 #include "ui/aura/client/activation_client.h"
9 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/cursor_client.h" 11 #include "ui/aura/client/cursor_client.h"
11 #include "ui/aura/client/drag_drop_client.h" 12 #include "ui/aura/client/drag_drop_client.h"
12 #include "ui/aura/client/focus_client.h" 13 #include "ui/aura/client/focus_client.h"
13 #include "ui/aura/client/window_tree_client.h" 14 #include "ui/aura/client/window_tree_client.h"
14 #include "ui/aura/root_window.h" 15 #include "ui/aura/root_window.h"
15 #include "ui/aura/root_window_host.h" 16 #include "ui/aura/root_window_host.h"
16 #include "ui/aura/window.h" 17 #include "ui/aura/window.h"
17 #include "ui/aura/window_observer.h" 18 #include "ui/aura/window_observer.h"
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 content_window_->SetBounds(new_bounds); 1061 content_window_->SetBounds(new_bounds);
1061 // Can be NULL at start. 1062 // Can be NULL at start.
1062 if (content_window_container_) 1063 if (content_window_container_)
1063 content_window_container_->SetBounds(new_bounds); 1064 content_window_container_->SetBounds(new_bounds);
1064 native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); 1065 native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
1065 } 1066 }
1066 1067
1067 void DesktopNativeWidgetAura::OnRootWindowHostMoved( 1068 void DesktopNativeWidgetAura::OnRootWindowHostMoved(
1068 const aura::RootWindow* root, 1069 const aura::RootWindow* root,
1069 const gfx::Point& new_origin) { 1070 const gfx::Point& new_origin) {
1071 TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnRootWindowHostMoved",
1072 "new_origin", new_origin.ToString());
1073
1070 native_widget_delegate_->OnNativeWidgetMove(); 1074 native_widget_delegate_->OnNativeWidgetMove();
1071 } 1075 }
1072 1076
1073 //////////////////////////////////////////////////////////////////////////////// 1077 ////////////////////////////////////////////////////////////////////////////////
1074 // DesktopNativeWidgetAura, NativeWidget implementation: 1078 // DesktopNativeWidgetAura, NativeWidget implementation:
1075 1079
1076 ui::EventHandler* DesktopNativeWidgetAura::GetEventHandler() { 1080 ui::EventHandler* DesktopNativeWidgetAura::GetEventHandler() {
1077 return this; 1081 return this;
1078 } 1082 }
1079 1083
1080 void DesktopNativeWidgetAura::InstallInputMethodEventFilter() { 1084 void DesktopNativeWidgetAura::InstallInputMethodEventFilter() {
1081 DCHECK(!input_method_event_filter_.get()); 1085 DCHECK(!input_method_event_filter_.get());
1082 1086
1083 input_method_event_filter_.reset( 1087 input_method_event_filter_.reset(
1084 new corewm::InputMethodEventFilter(root_window_->GetAcceleratedWidget())); 1088 new corewm::InputMethodEventFilter(root_window_->GetAcceleratedWidget()));
1085 input_method_event_filter_->SetInputMethodPropertyInRootWindow( 1089 input_method_event_filter_->SetInputMethodPropertyInRootWindow(
1086 root_window_.get()); 1090 root_window_.get());
1087 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); 1091 root_window_event_filter_->AddHandler(input_method_event_filter_.get());
1088 } 1092 }
1089 1093
1090 void DesktopNativeWidgetAura::UpdateWindowTransparency() { 1094 void DesktopNativeWidgetAura::UpdateWindowTransparency() {
1091 content_window_->SetTransparent(ShouldUseNativeFrame()); 1095 content_window_->SetTransparent(ShouldUseNativeFrame());
1092 } 1096 }
1093 1097
1094 } // namespace views 1098 } // namespace views
OLDNEW
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698