Chromium Code Reviews| Index: components/arc/arc_util.cc |
| diff --git a/components/arc/arc_util.cc b/components/arc/arc_util.cc |
| index 7c3ee3f5a080b7e1b4d0b82dc0bbc686873c5b5e..2e106f71c7853ced3ef2f7d0c00f97e124ba7199 100644 |
| --- a/components/arc/arc_util.cc |
| +++ b/components/arc/arc_util.cc |
| @@ -6,6 +6,8 @@ |
| #include <string> |
| +#include "ash/shared/app_types.h" |
| +#include "ash/wm_window.h" |
| #include "base/command_line.h" |
| #include "base/feature_list.h" |
| #include "chromeos/chromeos_switches.h" |
| @@ -111,4 +113,12 @@ bool IsArcOptInVerificationDisabled() { |
| chromeos::switches::kDisableArcOptInVerification); |
| } |
| +bool IsArcAppWindow(aura::Window* window) { |
| + // The getter returns nullptr when |window| is nullptr. |
| + ash::WmWindow* wm_window = ash::WmWindow::Get(window); |
| + if (!wm_window) |
| + return false; |
| + return wm_window->GetAppType() == static_cast<int>(ash::AppType::ARC_APP); |
|
oshima
2017/05/13 01:06:09
Could you please use GetProperty(aura::client::kAp
Yusuke Sato
2017/05/15 21:57:50
Done.
|
| +} |
| + |
| } // namespace arc |