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

Side by Side Diff: chrome/browser/ui/ash/tabs/dock_info_ash.cc

Issue 10948020: Convert native mouse locations to the locations in screen coordinate in RootWindowHostLinux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 | « ash/wm/workspace/workspace_window_resizer_unittest.cc ('k') | ui/aura/root_window.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 "chrome/browser/ui/tabs/dock_info.h" 5 #include "chrome/browser/ui/tabs/dock_info.h"
6 6
7 #include "ash/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "ash/wm/coordinate_conversion.h" 8 #include "ash/wm/coordinate_conversion.h"
9 #include "ui/aura/client/screen_position_client.h" 9 #include "ui/aura/client/screen_position_client.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 10 matching lines...) Expand all
21 aura::Window* window) { 21 aura::Window* window) {
22 if (ignore.find(window) != ignore.end()) 22 if (ignore.find(window) != ignore.end())
23 return NULL; 23 return NULL;
24 24
25 if (!window->IsVisible()) 25 if (!window->IsVisible())
26 return NULL; 26 return NULL;
27 27
28 if (window->id() == ash::internal::kShellWindowId_PhantomWindow) 28 if (window->id() == ash::internal::kShellWindowId_PhantomWindow)
29 return NULL; 29 return NULL;
30 30
31 if (window->layer()->type() == ui::LAYER_TEXTURED) { 31 if (window->layer()->type() == ui::LAYER_TEXTURED)
32 gfx::Point window_point(screen_point); 32 return window->GetBoundsInScreen().Contains(screen_point) ? window : NULL;
33 aura::client::GetScreenPositionClient(window->GetRootWindow())-> 33
34 ConvertPointFromScreen(window, &window_point);
35 return gfx::Rect(window->bounds().size()).Contains(window_point) ?
36 window : NULL;
37 }
38 for (aura::Window::Windows::const_reverse_iterator i = 34 for (aura::Window::Windows::const_reverse_iterator i =
39 window->children().rbegin(); i != window->children().rend(); ++i) { 35 window->children().rbegin(); i != window->children().rend(); ++i) {
40 aura::Window* result = 36 aura::Window* result =
41 GetLocalProcessWindowAtPointImpl(screen_point, ignore, *i); 37 GetLocalProcessWindowAtPointImpl(screen_point, ignore, *i);
42 if (result) 38 if (result)
43 return result; 39 return result;
44 } 40 }
45 return NULL; 41 return NULL;
46 } 42 }
47 43
(...skipping 18 matching lines...) Expand all
66 bool DockInfo::GetWindowBounds(gfx::Rect* bounds) const { 62 bool DockInfo::GetWindowBounds(gfx::Rect* bounds) const {
67 if (!window()) 63 if (!window())
68 return false; 64 return false;
69 *bounds = window_->bounds(); 65 *bounds = window_->bounds();
70 return true; 66 return true;
71 } 67 }
72 68
73 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const { 69 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const {
74 window_->SetBounds(bounds); 70 window_->SetBounds(bounds);
75 } 71 }
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer_unittest.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698