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

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

Issue 14589016: Unit test for BrowserViewLayout that does not depend on BrowserView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: layout works thru toolbar Created 7 years, 7 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: chrome/browser/ui/views/frame/browser_view.h
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index 721f74c68730ebdb734706fe98264054e23a9f8a..67cf43218d67d98527c8c725ab30ad57605dc2d0 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -42,6 +42,7 @@
class BookmarkBarView;
class Browser;
class BrowserViewLayout;
+class BrowserViewLayoutDelegate;
class ContentsContainer;
class DownloadShelfView;
class FullscreenExitBubbleViews;
@@ -460,7 +461,9 @@ class BrowserView : public BrowserWindow,
views::WebView* GetContentsWebViewForTest() { return contents_web_view_; }
private:
- friend class BrowserViewLayout;
+ // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
+ // interface to keep these two classes decoupled and testable.
+ friend class BrowserViewLayoutDelegateImpl;
FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView);
FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest,
TestAboutChromeViewAccObj);
@@ -613,6 +616,10 @@ class BrowserView : public BrowserWindow,
// The Browser object we are associated with.
scoped_ptr<Browser> browser_;
+ // Delegate implementation for BrowserViewLayout. Exists as a member because
+ // some methods have the same names as BrowserWindow overrides.
+ scoped_ptr<BrowserViewLayoutDelegate> layout_delegate_;
+
// BrowserView layout (LTR one is pictured here).
//
// --------------------------------------------------------------------
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | chrome/browser/ui/views/frame/browser_view_layout.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698