Index: chrome/browser/apps/app_window_registry_util.h |
diff --git a/chrome/browser/apps/app_window_registry_util.h b/chrome/browser/apps/app_window_registry_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c84eaef749fe322b28fc57d110d4aa117b6b4e5e |
--- /dev/null |
+++ b/chrome/browser/apps/app_window_registry_util.h |
@@ -0,0 +1,30 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_APPS_APP_WINDOW_REGISTRY_UTIL_H_ |
+#define CHROME_BROWSER_APPS_APP_WINDOW_REGISTRY_UTIL_H_ |
+ |
+#include "ui/gfx/native_widget_types.h" |
+ |
+namespace extensions { |
+class AppWindow; |
+} |
+ |
+// Utility functions to interact with app windows across all profiles. |
+class AppWindowRegistryUtil { |
tapted
2014/09/25 05:47:34
I think the style guide lightly discourages classe
hashimoto
2014/09/25 06:51:55
I introduced this AppWindowRegistryUtil class beca
|
+ public: |
+ // Returns the app window for |window|, looking in all browser contexts. |
+ static extensions::AppWindow* GetAppWindowForNativeWindowAnyProfile( |
+ gfx::NativeWindow window); |
+ |
+ // Returns true if the number of app windows registered across all browser |
+ // contexts is non-zero. |window_type_mask| is a bitwise OR filter of |
+ // AppWindow::WindowType, or 0 for any window type. |
+ static bool IsAppWindowRegisteredInAnyProfile(int window_type_mask); |
+ |
+ // Close all app windows in all profiles. |
+ static void CloseAllAppWindows(); |
+}; |
+ |
+#endif // CHROME_BROWSER_APPS_APP_WINDOW_REGISTRY_UTIL_H_ |