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

Unified Diff: apps/app_window_registry_util.h

Issue 586613002: Remove AppsClient::GetLoadedBrowserContexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: apps/app_window_registry_util.h
diff --git a/apps/app_window_registry_util.h b/apps/app_window_registry_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..21ddf22a860f9b319041b23b06616fc4a5269189
--- /dev/null
+++ b/apps/app_window_registry_util.h
@@ -0,0 +1,33 @@
+// 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 APPS_APP_WINDOW_REGISTRY_UTIL_H_
+#define APPS_APP_WINDOW_REGISTRY_UTIL_H_
+
+#include "ui/gfx/native_widget_types.h"
+
+namespace extensions {
+class AppWindow;
+}
+
+namespace apps {
+
+class AppWindowRegistryUtil {
+ 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();
+};
+
+} // namespace apps
+
+#endif // APPS_APP_WINDOW_REGISTRY_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698