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

Unified Diff: views/layout/center_layout.h

Issue 7610011: Update Sad Tab help text and link. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix message centering. Created 9 years, 4 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: views/layout/center_layout.h
diff --git a/views/layout/center_layout.h b/views/layout/center_layout.h
new file mode 100644
index 0000000000000000000000000000000000000000..67a0d1d4557a3f42a932adfc5acdfbea8ac45eb5
--- /dev/null
+++ b/views/layout/center_layout.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2011 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 VIEWS_LAYOUT_CENTER_LAYOUT_H_
+#define VIEWS_LAYOUT_CENTER_LAYOUT_H_
+#pragma once
+
+#include "views/layout/layout_manager.h"
+#include "views/view.h"
+
+namespace gfx {
+class Size;
+}
+
+namespace views {
+
+// A layout manager that layouts a single child at the center of the host view.
+// The child's size is limited by the host's local bounds and insets.
+class VIEWS_EXPORT CenterLayout : public LayoutManager {
+ public:
+ CenterLayout();
+ virtual ~CenterLayout();
+
+ // Overridden from LayoutManager:
+ virtual void Layout(View* host) OVERRIDE;
+ virtual gfx::Size GetPreferredSize(View* host) OVERRIDE;
+ virtual int GetPreferredHeightForWidth(View* host, int width) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CenterLayout);
+};
+
+} // namespace views
+
+#endif // VIEWS_LAYOUT_CENTER_LAYOUT_H_

Powered by Google App Engine
This is Rietveld 408576698