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

Unified Diff: ui/views/widget/widget_parent.h

Issue 2426473009: mash: Place views Wi-Fi network config dialogs in correct window parent (Closed)
Patch Set: rebase Created 4 years, 2 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: ui/views/widget/widget_parent.h
diff --git a/ui/views/widget/widget_parent.h b/ui/views/widget/widget_parent.h
new file mode 100644
index 0000000000000000000000000000000000000000..f6f6be18b38620b44e46c9b0f9ed2b588dec3aec
--- /dev/null
+++ b/ui/views/widget/widget_parent.h
@@ -0,0 +1,31 @@
+// Copyright 2016 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 UI_VIEWS_WIDGET_WIDGET_PARENT_H_
+#define UI_VIEWS_WIDGET_WIDGET_PARENT_H_
+
+#include "ui/gfx/native_widget_types.h"
+
+namespace views {
+
+// Utility struct for storing the parent of a Widget. Most useful on mus where
+// gfx::NativeWindow is not a ui::Window.
+struct WidgetParent {
+ static const int kInvalidContainerId = -1;
+
+ // Used on Windows, Linux and classic ash Chrome OS to specify the parent.
+ // Can be used as a parent under mus if it is a top-level window that has a
+ // corresponding ui::Window.
+ gfx::NativeWindow native_parent = nullptr;
+
+ // Opaque container ID. Interpretation is platform-specific. Commonly used to
+ // store an ash shell window ID in mash.
+ int container_id = kInvalidContainerId;
+
+ // TODO(jamescook): Add display ID.
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_WIDGET_PARENT_H_

Powered by Google App Engine
This is Rietveld 408576698