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

Side by Side Diff: ui/views/mouse_watcher_view_host.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 10 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
« no previous file with comments | « ui/views/examples/examples_main.cc ('k') | ui/views/mus/screen_mus.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/mouse_watcher_view_host.h" 5 #include "ui/views/mouse_watcher_view_host.h"
6 6
7 #include "ui/gfx/screen.h" 7 #include "ui/gfx/screen.h"
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 #include "ui/views/widget/widget.h" 9 #include "ui/views/widget/widget.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 return bounds.Contains(screen_point.x(), screen_point.y()); 43 return bounds.Contains(screen_point.x(), screen_point.y());
44 } 44 }
45 45
46 // Returns true if the mouse is over the view's window. 46 // Returns true if the mouse is over the view's window.
47 bool MouseWatcherViewHost::IsMouseOverWindow() { 47 bool MouseWatcherViewHost::IsMouseOverWindow() {
48 Widget* widget = view_->GetWidget(); 48 Widget* widget = view_->GetWidget();
49 if (!widget) 49 if (!widget)
50 return false; 50 return false;
51 51
52 return gfx::Screen::GetScreenFor(widget->GetNativeView())-> 52 return gfx::Screen::GetScreen()->GetWindowUnderCursor() ==
53 GetWindowUnderCursor() == widget->GetNativeWindow(); 53 widget->GetNativeWindow();
54 } 54 }
55 55
56 } // namespace views 56 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/examples_main.cc ('k') | ui/views/mus/screen_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698