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

Unified Diff: chrome/browser/ui/views/frame/browser_view_layout.h

Issue 14348011: Add a unit test for BrowserViewLayout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/browser_view_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view_layout.h
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.h b/chrome/browser/ui/views/frame/browser_view_layout.h
index 37dd370dce8b9ffb3404e637e84e411cee5bc81a..18fef6231e2c63ee972277e20a3bd01b972c4c90 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.h
+++ b/chrome/browser/ui/views/frame/browser_view_layout.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/rect.h"
#include "ui/views/layout/layout_manager.h"
@@ -36,7 +37,7 @@ class BrowserViewLayout : public views::LayoutManager {
// The vertical overlap between the TabStrip and the Toolbar.
static const int kToolbarTabStripVerticalOverlap;
- BrowserViewLayout();
+ explicit BrowserViewLayout(Browser* browser);
virtual ~BrowserViewLayout();
WebContentsModalDialogHost* GetWebContentsModalDialogHost();
@@ -65,6 +66,8 @@ class BrowserViewLayout : public views::LayoutManager {
virtual gfx::Size GetPreferredSize(views::View* host) OVERRIDE;
private:
+ FRIEND_TEST_ALL_PREFIXES(BrowserViewLayoutTest, BrowserViewLayout);
+ FRIEND_TEST_ALL_PREFIXES(BrowserViewLayoutTest, Layout);
class WebContentsModalDialogHostViews;
enum InstantUIState {
@@ -77,8 +80,7 @@ class BrowserViewLayout : public views::LayoutManager {
kInstantUIFullPageResults,
};
- Browser* browser();
- const Browser* browser() const;
+ Browser* browser() { return browser_; }
// Layout the tab strip region, returns the coordinate of the bottom of the
// TabStrip, for laying out subsequent controls.
@@ -125,6 +127,9 @@ class BrowserViewLayout : public views::LayoutManager {
// Returns true if an infobar is showing.
bool InfobarVisible() const;
+ // The browser from the owning BrowserView.
+ Browser* browser_;
+
// Child views that the layout manager manages.
views::SingleSplitView* contents_split_;
ContentsContainer* contents_container_;
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/browser_view_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698