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

Side by Side Diff: components/mus/ws/window_finder.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/ws/window_finder.h" 5 #include "components/mus/ws/window_finder.h"
6 6
7 #include "cc/surfaces/surface_id.h" 7 #include "cc/surfaces/surface_id.h"
8 #include "components/mus/surfaces/surfaces_state.h" 8 #include "components/mus/surfaces/surfaces_state.h"
9 #include "components/mus/ws/server_window.h" 9 #include "components/mus/ws/server_window.h"
10 #include "components/mus/ws/server_window_delegate.h" 10 #include "components/mus/ws/server_window_delegate.h"
11 #include "components/mus/ws/server_window_surface.h" 11 #include "components/mus/ws/server_window_surface.h"
12 #include "components/mus/ws/server_window_surface_manager.h" 12 #include "components/mus/ws/server_window_surface_manager.h"
13 #include "components/mus/ws/window_coordinate_conversions.h" 13 #include "components/mus/ws/window_coordinate_conversions.h"
14 #include "ui/gfx/geometry/point.h" 14 #include "ui/gfx/geometry/point.h"
15 #include "ui/gfx/geometry/point_f.h" 15 #include "ui/gfx/geometry/point_f.h"
16 #include "ui/gfx/transform.h" 16 #include "ui/gfx/transform.h"
17 17
18 namespace mus { 18 namespace mus {
19 namespace ws { 19 namespace ws {
20 namespace { 20 namespace {
21 21
22 bool IsValidWindowForEvents(ServerWindow* window) { 22 bool IsValidWindowForEvents(ServerWindow* window) {
23 ServerWindowSurfaceManager* surface_manager = window->surface_manager(); 23 ServerWindowSurfaceManager* surface_manager = window->surface_manager();
24 return surface_manager && 24 return surface_manager &&
25 surface_manager->HasSurfaceOfType(mojom::SURFACE_TYPE_DEFAULT); 25 surface_manager->HasSurfaceOfType(mojom::SurfaceType::DEFAULT);
26 } 26 }
27 27
28 ServerWindow* FindDeepestVisibleWindowNonSurface(ServerWindow* window, 28 ServerWindow* FindDeepestVisibleWindowNonSurface(ServerWindow* window,
29 gfx::Point* location) { 29 gfx::Point* location) {
30 const ServerWindow::Windows children(window->GetChildren()); 30 const ServerWindow::Windows children(window->GetChildren());
31 for (auto iter = children.rbegin(); iter != children.rend(); ++iter) { 31 for (auto iter = children.rbegin(); iter != children.rend(); ++iter) {
32 ServerWindow* child = *iter; 32 ServerWindow* child = *iter;
33 if (!child->visible()) 33 if (!child->visible())
34 continue; 34 continue;
35 35
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (target) 107 if (target)
108 transform.TransformPoint(location); 108 transform.TransformPoint(location);
109 return target; 109 return target;
110 } 110 }
111 111
112 gfx::Transform GetTransformToWindow(cc::SurfaceId display_surface_id, 112 gfx::Transform GetTransformToWindow(cc::SurfaceId display_surface_id,
113 ServerWindow* window) { 113 ServerWindow* window) {
114 if (!display_surface_id.is_null()) { 114 if (!display_surface_id.is_null()) {
115 gfx::Transform transform; 115 gfx::Transform transform;
116 if (HitTestSurfaceOfType(display_surface_id, window, 116 if (HitTestSurfaceOfType(display_surface_id, window,
117 mus::mojom::SURFACE_TYPE_DEFAULT, &transform) || 117 mus::mojom::SurfaceType::DEFAULT, &transform) ||
118 HitTestSurfaceOfType(display_surface_id, window, 118 HitTestSurfaceOfType(display_surface_id, window,
119 mus::mojom::SURFACE_TYPE_UNDERLAY, &transform)) { 119 mus::mojom::SurfaceType::UNDERLAY, &transform)) {
120 return transform; 120 return transform;
121 } 121 }
122 } 122 }
123 123
124 return GetTransformToWindowNonSurface(window); 124 return GetTransformToWindowNonSurface(window);
125 } 125 }
126 126
127 } // namespace ws 127 } // namespace ws
128 } // namespace mus 128 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/transient_windows_unittest.cc ('k') | components/mus/ws/window_manager_access_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698