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

Side by Side Diff: chrome/browser/ui/views/tabs/window_finder_ash.cc

Issue 468603002: Chrome OS: Fix tab mergeability with cursor compositing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/tabs/window_finder.h" 5 #include "chrome/browser/ui/views/tabs/window_finder.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/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/aura/window_event_dispatcher.h" 10 #include "ui/aura/window_event_dispatcher.h"
11 11
12 namespace { 12 namespace {
13 13
14 aura::Window* GetLocalProcessWindowAtPointImpl( 14 aura::Window* GetLocalProcessWindowAtPointImpl(
15 const gfx::Point& screen_point, 15 const gfx::Point& screen_point,
16 const std::set<gfx::NativeView>& ignore, 16 const std::set<gfx::NativeView>& ignore,
17 aura::Window* window) { 17 aura::Window* window) {
18 if (ignore.find(window) != ignore.end()) 18 if (ignore.find(window) != ignore.end())
19 return NULL; 19 return NULL;
20 20
21 if (!window->IsVisible()) 21 if (!window->IsVisible())
22 return NULL; 22 return NULL;
23 23
24 if (window->id() == ash::kShellWindowId_PhantomWindow || 24 if (window->id() == ash::kShellWindowId_PhantomWindow ||
25 window->id() == ash::kShellWindowId_OverlayContainer) 25 window->id() == ash::kShellWindowId_OverlayContainer ||
26 window->id() == ash::kShellWindowId_MouseCursorContainer)
26 return NULL; 27 return NULL;
27 28
28 if (window->layer()->type() == ui::LAYER_TEXTURED) 29 if (window->layer()->type() == ui::LAYER_TEXTURED)
29 return window->GetBoundsInScreen().Contains(screen_point) ? window : NULL; 30 return window->GetBoundsInScreen().Contains(screen_point) ? window : NULL;
30 31
31 for (aura::Window::Windows::const_reverse_iterator i = 32 for (aura::Window::Windows::const_reverse_iterator i =
32 window->children().rbegin(); i != window->children().rend(); ++i) { 33 window->children().rbegin(); i != window->children().rend(); ++i) {
33 aura::Window* result = 34 aura::Window* result =
34 GetLocalProcessWindowAtPointImpl(screen_point, ignore, *i); 35 GetLocalProcessWindowAtPointImpl(screen_point, ignore, *i);
35 if (result) 36 if (result)
36 return result; 37 return result;
37 } 38 }
38 return NULL; 39 return NULL;
39 } 40 }
40 41
41 } // namespace 42 } // namespace
42 43
43 aura::Window* GetLocalProcessWindowAtPointAsh( 44 aura::Window* GetLocalProcessWindowAtPointAsh(
44 const gfx::Point& screen_point, 45 const gfx::Point& screen_point,
45 const std::set<aura::Window*>& ignore) { 46 const std::set<aura::Window*>& ignore) {
46 return GetLocalProcessWindowAtPointImpl( 47 return GetLocalProcessWindowAtPointImpl(
47 screen_point, ignore, ::ash::wm::GetRootWindowAt(screen_point)); 48 screen_point, ignore, ::ash::wm::GetRootWindowAt(screen_point));
48 } 49 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698