diff options
Diffstat (limited to 'chrome/browser/location_bar.h')
-rw-r--r-- | chrome/browser/location_bar.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/chrome/browser/location_bar.h b/chrome/browser/location_bar.h index 0ffc4d6..776427e 100644 --- a/chrome/browser/location_bar.h +++ b/chrome/browser/location_bar.h @@ -2,17 +2,22 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// The LocationBar class is a virtual interface, defining access to the +// window's location bar component. This class exists so that cross-platform +// components like the browser command system can talk to the platform +// specific implementations of the location bar control. It also allows the +// location bar to be mocked for testing. + #ifndef CHROME_BROWSER_LOCATION_BAR_H_ #define CHROME_BROWSER_LOCATION_BAR_H_ +#include <string> + #include "chrome/common/page_transition_types.h" #include "webkit/glue/window_open_disposition.h" -//////////////////////////////////////////////////////////////////////////////// -// LocationBar -// An interface providing access to the Location Bar component of the browser -// window. -// +class TabContents; + class LocationBar { public: // Shows the first run information bubble anchored to the location bar. @@ -21,8 +26,8 @@ class LocationBar { // Returns the string of text entered in the location bar. virtual std::wstring GetInputString() const = 0; - // Returns the WindowOpenDisposition that should be used to determine where to - // open a URL entered in the location bar. + // Returns the WindowOpenDisposition that should be used to determine where + // to open a URL entered in the location bar. virtual WindowOpenDisposition GetWindowOpenDisposition() const = 0; // Returns the PageTransition that should be recorded in history when the URL @@ -35,8 +40,8 @@ class LocationBar { // Focuses and selects the contents of the location bar. virtual void FocusLocation() = 0; - // Clears the location bar, inserts an annoying little "?" turd and sets focus - // to it. + // Clears the location bar, inserts an annoying little "?" turd and sets + // focus to it. virtual void FocusSearch() = 0; // Saves the state of the location bar to the specified TabContents, so that @@ -44,4 +49,4 @@ class LocationBar { virtual void SaveStateToContents(TabContents* contents) = 0; }; -#endif // #ifndef CHROME_BROWSER_LOCATION_BAR_H_ +#endif // CHROME_BROWSER_LOCATION_BAR_H_ |