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

Unified Diff: components/arc/arc_util.cc

Issue 2877883002: Consolidate two IsArcWindow functions to reduce code duplication (Closed)
Patch Set: Address a comment from sadrul@ Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/arc/arc_util.h ('k') | components/arc/arc_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_util.cc
diff --git a/components/arc/arc_util.cc b/components/arc/arc_util.cc
index 7c3ee3f5a080b7e1b4d0b82dc0bbc686873c5b5e..963368e3bc4c366869ef303f26fcbfb5f94b2520 100644
--- a/components/arc/arc_util.cc
+++ b/components/arc/arc_util.cc
@@ -6,10 +6,13 @@
#include <string>
+#include "ash/shared/app_types.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "chromeos/chromeos_switches.h"
#include "components/user_manager/user_manager.h"
+#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/window.h"
namespace arc {
@@ -111,4 +114,11 @@ bool IsArcOptInVerificationDisabled() {
chromeos::switches::kDisableArcOptInVerification);
}
+bool IsArcAppWindow(aura::Window* window) {
+ if (!window)
+ return false;
+ return window->GetProperty(aura::client::kAppType) ==
+ static_cast<int>(ash::AppType::ARC_APP);
+}
+
} // namespace arc
« no previous file with comments | « components/arc/arc_util.h ('k') | components/arc/arc_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698