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

Unified Diff: ash/common/system/tray/tray_popup_layout_factory.h

Issue 2439093002: Reland of "Added common layout framework for system menu rows." (Closed)
Patch Set: Addressed review comments. 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
« no previous file with comments | « ash/common/system/tray/tray_constants.cc ('k') | ash/common/system/tray/tray_popup_layout_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_popup_layout_factory.h
diff --git a/ash/common/system/tray/tray_popup_layout_factory.h b/ash/common/system/tray/tray_popup_layout_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..f279be6da57eb3c1286239428cd6309f831507ee
--- /dev/null
+++ b/ash/common/system/tray/tray_popup_layout_factory.h
@@ -0,0 +1,49 @@
+// 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 ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_
+#define ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_
+
+#include <memory>
+
+#include "ash/common/system/tray/tri_view.h"
+#include "base/macros.h"
+
+namespace views {
+class View;
+} // namespace views
+
+namespace ash {
+
+// Factory functions for system menu row container views.
+class TrayPopupLayoutFactory {
+ public:
+ // Creates a default container view to be used most system menu rows. The
+ // caller takes over ownership of the created view.
+ //
+ // The returned view consists of 3 regions: START, CENTER, and END. Any child
+ // Views added to the START and END containers will be added horizonatlly and
+ // any Views added to the CENTER container will be added vertically.
+ //
+ // The START and END containers have a fixed width but can grow into the
+ // CENTER container if space is required and available.
+ //
+ // The CENTER container has a flexible width.
+ static TriView* CreateDefaultRowView();
+
+ private:
+ TrayPopupLayoutFactory();
+ ~TrayPopupLayoutFactory();
+
+ // Configures the specified |container| view with the default layout. Used by
+ // CreateDefaultRowView().
+ static void ConfigureDefaultLayout(TriView* tri_view,
+ TriView::Container container);
+
+ DISALLOW_COPY_AND_ASSIGN(TrayPopupLayoutFactory);
+};
+
+} // namespace ash
+
+#endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_
« no previous file with comments | « ash/common/system/tray/tray_constants.cc ('k') | ash/common/system/tray/tray_popup_layout_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698