diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 20:15:35 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 20:15:35 +0000 |
commit | 7745b82920b6a761f316c78a85e7af8742434f1c (patch) | |
tree | d942f01dd45823d55c223dcfb868012d8194c82a /chrome/browser/browser_window.h | |
parent | 41910d1c4de903e0337ae41a9c835d918f8e264a (diff) | |
download | chromium_src-7745b82920b6a761f316c78a85e7af8742434f1c.zip chromium_src-7745b82920b6a761f316c78a85e7af8742434f1c.tar.gz chromium_src-7745b82920b6a761f316c78a85e7af8742434f1c.tar.bz2 |
Re-land this from earlier... unit tests no longer crash.
Extract a cross platform LocationBar interface.
Adds a TestLocationBar object that unit tests can use to mock the location bar (fixes NULL deref).
Review URL: http://codereview.chromium.org/18851
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8745 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_window.h')
-rw-r--r-- | chrome/browser/browser_window.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h index 38f32b4..408f4ff 100644 --- a/chrome/browser/browser_window.h +++ b/chrome/browser/browser_window.h @@ -5,13 +5,11 @@ #ifndef CHROME_BROWSER_BROWSER_WINDOW_H_ #define CHROME_BROWSER_BROWSER_WINDOW_H_ -class BookmarkBarView; class Browser; class BrowserList; -class BrowserView; class BrowserWindowTesting; class GURL; -class LocationBarView; +class LocationBar; class HtmlDialogContentsDelegate; class Profile; class StatusBubble; @@ -25,7 +23,7 @@ class Rect; // BrowserWindow interface // An interface implemented by the "view" of the Browser window. // -// NOTE: all getters, save GetTabStrip(), may return NULL. +// NOTE: All getters except GetTabStrip() may return NULL. class BrowserWindow { public: // Initialize the frame. @@ -89,7 +87,7 @@ class BrowserWindow { virtual bool IsMaximized() = 0; // Returns the location bar. - virtual LocationBarView* GetLocationBarView() const = 0; + virtual LocationBar* GetLocationBar() const = 0; // Informs the view whether or not a load is in progress for the current tab. // The view can use this notification to update the go/stop button. @@ -157,13 +155,19 @@ class BrowserWindow { virtual void DestroyBrowser() = 0; }; +class BookmarkBarView; +class LocationBarView; + // A BrowserWindow utility interface used for accessing elements of the browser // UI used only by UI test automation. class BrowserWindowTesting { -public: + public: #if defined(OS_WIN) - // Returns the Bookmark Bar view. + // Returns the BookmarkBarView. virtual BookmarkBarView* GetBookmarkBarView() = 0; + + // Returns the LocationBarView. + virtual LocationBarView* GetLocationBarView() const = 0; #endif }; |