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

Side by Side Diff: chrome/browser/ui/aura/tabs/dock_info_auralinux.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 | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/tabs/dock_info.h" 5 #include "chrome/browser/ui/tabs/dock_info.h"
6 6
7 #include "base/debug/trace_event.h"
7 #include "chrome/browser/ui/host_desktop.h" 8 #include "chrome/browser/ui/host_desktop.h"
8 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
9 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
10 #if defined(USE_X11) 11 #if defined(USE_X11)
11 #include "ui/base/x/x11_util.h" 12 #include "ui/base/x/x11_util.h"
12 #endif 13 #endif
13 14
14 #if !defined(OS_CHROMEOS) && defined(USE_X11) 15 #if !defined(OS_CHROMEOS) && defined(USE_X11)
15 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" 16 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h"
16 17
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 DISALLOW_COPY_AND_ASSIGN(LocalProcessWindowFinder); 173 DISALLOW_COPY_AND_ASSIGN(LocalProcessWindowFinder);
173 }; 174 };
174 175
175 } // namespace 176 } // namespace
176 177
177 // static 178 // static
178 gfx::NativeView DockInfo::GetLocalProcessWindowAtPoint( 179 gfx::NativeView DockInfo::GetLocalProcessWindowAtPoint(
179 chrome::HostDesktopType host_desktop_type, 180 chrome::HostDesktopType host_desktop_type,
180 const gfx::Point& screen_point, 181 const gfx::Point& screen_point,
181 const std::set<gfx::NativeView>& ignore) { 182 const std::set<gfx::NativeView>& ignore) {
183 TRACE_EVENT1("ui", "DockInfo::GetLocalProcessWindowAtPoint",
184 "screen_point", screen_point.ToString());
185
182 // The X11 server is the canonical state of what the window stacking order 186 // The X11 server is the canonical state of what the window stacking order
183 // is. 187 // is.
184 XID xid = 188 XID xid =
185 LocalProcessWindowFinder::GetProcessWindowAtPoint(screen_point, ignore); 189 LocalProcessWindowFinder::GetProcessWindowAtPoint(screen_point, ignore);
186 return views::DesktopRootWindowHostX11::GetContentWindowForXID(xid); 190 return views::DesktopRootWindowHostX11::GetContentWindowForXID(xid);
187 } 191 }
188 #else 192 #else
189 // static 193 // static
190 gfx::NativeView DockInfo::GetLocalProcessWindowAtPoint( 194 gfx::NativeView DockInfo::GetLocalProcessWindowAtPoint(
191 chrome::HostDesktopType host_desktop_type, 195 chrome::HostDesktopType host_desktop_type,
(...skipping 18 matching lines...) Expand all
210 bool DockInfo::GetWindowBounds(gfx::Rect* bounds) const { 214 bool DockInfo::GetWindowBounds(gfx::Rect* bounds) const {
211 if (!window()) 215 if (!window())
212 return false; 216 return false;
213 *bounds = window_->bounds(); 217 *bounds = window_->bounds();
214 return true; 218 return true;
215 } 219 }
216 220
217 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const { 221 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const {
218 window_->SetBounds(bounds); 222 window_->SetBounds(bounds);
219 } 223 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698