Chromium Code Reviews| Index: chrome/browser/ui/views/tabs/window_finder_mus.cc |
| diff --git a/chrome/browser/ui/views/tabs/window_finder_mus.cc b/chrome/browser/ui/views/tabs/window_finder_mus.cc |
| index c42aec3a897db645a9955c554024a3436957e4bb..d7129698d33fabdee9ddd8be18effd3a2ae9790d 100644 |
| --- a/chrome/browser/ui/views/tabs/window_finder_mus.cc |
| +++ b/chrome/browser/ui/views/tabs/window_finder_mus.cc |
| @@ -4,17 +4,22 @@ |
| #include "chrome/browser/ui/views/tabs/window_finder_mus.h" |
| +#include "content/public/common/service_manager_connection.h" // nogncheck |
| +#include "services/service_manager/runner/common/client_util.h" // nogncheck |
| #include "ui/aura/window.h" |
| #include "ui/views/mus/native_widget_mus.h" |
| #include "ui/views/mus/window_manager_connection.h" |
| -WindowFinderMus::WindowFinderMus() {} |
| +bool GetLocalProcessWindowAtPointMus( |
| + const gfx::Point& screen_point, |
| + const std::set<gfx::NativeWindow>& ignore, |
| + gfx::NativeWindow* mus_result) { |
|
sky
2016/10/31 22:43:46
no newline, and for safety always set mus_result t
tonikitoo
2016/10/31 23:39:37
Done.
|
| -WindowFinderMus::~WindowFinderMus() {} |
| + content::ServiceManagerConnection* service_manager_connection = |
| + content::ServiceManagerConnection::GetForProcess(); |
| + if (!service_manager_connection || !service_manager::ServiceManagerIsRemote()) |
| + return false; |
| -gfx::NativeWindow WindowFinderMus::GetLocalProcessWindowAtPoint( |
| - const gfx::Point& screen_point, |
| - const std::set<gfx::NativeWindow>& ignore) { |
| std::set<ui::Window*> mus_windows = |
| views::WindowManagerConnection::Get()->GetRoots(); |
| // TODO(erg): Needs to deal with stacking order here. |
| @@ -30,9 +35,10 @@ gfx::NativeWindow WindowFinderMus::GetLocalProcessWindowAtPoint( |
| if (base::ContainsKey(ignore, content_window)) |
| continue; |
| - return content_window; |
| + *mus_result = content_window; |
| + return true; |
| } |
| } |
| - return nullptr; |
| + return false; |
|
sky
2016/10/31 22:43:46
Why are you returning false here? Shouldn't this r
tonikitoo
2016/10/31 23:39:37
Done.
|
| } |