summaryrefslogtreecommitdiffstats
path: root/views/layout
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-26 01:52:08 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-26 01:52:08 +0000
commitcc40648ba7ced82ecf923475ddcaca4e690408b8 (patch)
treed794fb7749739851254775e62888ee1addd10920 /views/layout
parent8f8ff994a1f9085ec49c40756db85d5da37ae807 (diff)
downloadchromium_src-cc40648ba7ced82ecf923475ddcaca4e690408b8.zip
chromium_src-cc40648ba7ced82ecf923475ddcaca4e690408b8.tar.gz
chromium_src-cc40648ba7ced82ecf923475ddcaca4e690408b8.tar.bz2
views: Forward declare "class View;" in layout_manager.h
And move the include of views/view.h from the header to the source file. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6332013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/layout')
-rw-r--r--views/layout/box_layout.cc7
-rw-r--r--views/layout/box_layout.h13
-rw-r--r--views/layout/layout_manager.cc2
-rw-r--r--views/layout/layout_manager.h4
4 files changed, 21 insertions, 5 deletions
diff --git a/views/layout/box_layout.cc b/views/layout/box_layout.cc
index 5025d7e..6a6ede6 100644
--- a/views/layout/box_layout.cc
+++ b/views/layout/box_layout.cc
@@ -4,6 +4,10 @@
#include "views/layout/box_layout.h"
+#include "gfx/insets.h"
+#include "gfx/rect.h"
+#include "views/view.h"
+
namespace views {
BoxLayout::BoxLayout(BoxLayout::Orientation orientation,
@@ -16,6 +20,9 @@ BoxLayout::BoxLayout(BoxLayout::Orientation orientation,
between_child_spacing_(between_child_spacing) {
}
+BoxLayout::~BoxLayout() {
+}
+
void BoxLayout::Layout(View* host) {
gfx::Rect childArea(gfx::Rect(host->size()));
childArea.Inset(host->GetInsets());
diff --git a/views/layout/box_layout.h b/views/layout/box_layout.h
index fde203c..e2910b4 100644
--- a/views/layout/box_layout.h
+++ b/views/layout/box_layout.h
@@ -7,10 +7,17 @@
#pragma once
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "views/layout/layout_manager.h"
+namespace gfx {
+class Size;
+}
+
namespace views {
+class View;
+
// A Layout manager that arranges child views vertically or horizontally in a
// side-by-side fashion with spacing around and between the child views. The
// child views are always sized according to their preferred size. If the
@@ -31,11 +38,11 @@ class BoxLayout : public LayoutManager {
int inside_border_horizontal_spacing,
int inside_border_vertical_spacing,
int between_child_spacing);
- virtual ~BoxLayout() {}
+ virtual ~BoxLayout();
// Overridden from views::LayoutManager:
- virtual void Layout(View* host);
- virtual gfx::Size GetPreferredSize(View* host);
+ virtual void Layout(View* host) OVERRIDE;
+ virtual gfx::Size GetPreferredSize(View* host) OVERRIDE;
private:
const Orientation orientation_;
diff --git a/views/layout/layout_manager.cc b/views/layout/layout_manager.cc
index adaad9f..c62c6bb 100644
--- a/views/layout/layout_manager.cc
+++ b/views/layout/layout_manager.cc
@@ -4,6 +4,8 @@
#include "views/layout/layout_manager.h"
+#include "views/view.h"
+
namespace views {
LayoutManager::~LayoutManager() {
diff --git a/views/layout/layout_manager.h b/views/layout/layout_manager.h
index 328238a..3fb99c1 100644
--- a/views/layout/layout_manager.h
+++ b/views/layout/layout_manager.h
@@ -6,14 +6,14 @@
#define VIEWS_LAYOUT_MANAGER_H_
#pragma once
-#include "views/view.h"
-
namespace gfx {
class Size;
}
namespace views {
+class View;
+
/////////////////////////////////////////////////////////////////////////////
//
// LayoutManager interface