diff options
Diffstat (limited to 'chrome/browser/browser_window.h')
-rw-r--r-- | chrome/browser/browser_window.h | 82 |
1 files changed, 15 insertions, 67 deletions
diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h index 6f0e6ec..c76e553 100644 --- a/chrome/browser/browser_window.h +++ b/chrome/browser/browser_window.h @@ -47,11 +47,16 @@ class BrowserWindow { // events are still fired) until the drag ends, then close. virtual void Close() = 0; + // Activates (brings to front) the window. Restores the window from minimized + // state if necessary. + virtual void Activate() = 0; + + // Flashes the taskbar item associated with this frame. + virtual void FlashFrame() = 0; + // Return a platform dependent identifier for this frame. On Windows, this - // returns an HWND. - // TODO(beng): This should go away. The Browser object and friends should not - // be interacting with platform types. - virtual void* GetPlatformID() = 0; + // returns an HWND. DO NOT USE IN CROSS PLATFORM CODE. + virtual void* GetNativeHandle() = 0; // TODO(beng): REMOVE (obtain via BrowserFrame). // Return the TabStrip associated with the frame. @@ -60,50 +65,16 @@ class BrowserWindow { // Return the status bubble associated with the frame virtual StatusBubble* GetStatusBubble() = 0; - // Inform the receiving frame that the visibility of one of the shelfs/bars - // may have changed. - // TODO(beng): REMOVE - virtual void ShelfVisibilityChanged() {} - // Inform the receiving frame that an animation has progressed in the // selected tab. + // TODO(beng): Remove. Infobars/Boomarks bars should talk directly to + // BrowserView. virtual void SelectedTabToolbarSizeChanged(bool is_animating) = 0; // Inform the frame that the selected tab favicon or title has changed. Some // frames may need to refresh their title bar. // TODO(beng): make this pure virtual after XPFrame/VistaFrame retire. - virtual void UpdateTitleBar() { } - - // Sets the title displayed in various places within the OS, such as the task - // bar. - // TODO(beng): REMOVE - virtual void SetWindowTitle(const std::wstring& title) {} - - // Activates (brings to front) the window. Restores the window from minimized - // state if necessary. - virtual void Activate() = 0; - - // Flashes the taskbar item associated with this frame. - virtual void FlashFrame() = 0; - - // Makes the specified TabContents visible. If there is another TabContents - // visible presently, this method is responsible for hiding that TabContents - // cleanly as well. - // TODO(beng): REMOVE - virtual void ShowTabContents(TabContents* contents) {} - - // Sizes the frame to match the specified desired bounds for the contents. - // |contents_bounds| are in screen coordinates. - // TODO(beng): REMOVE - virtual void SizeToContents(const gfx::Rect& contents_bounds) = 0; - - // Set the accelerator table. This is called once after LoadAccelerators - // has been called on the frame. The callee becomes the owner of the passed - // map. The map associates accelerators with command ids. - // Note if you are not calling FrameUtil::LoadAccelerators() on this frame, - // this method is never invoked. - virtual void SetAcceleratorTable( - std::map<views::Accelerator, int>* accelerator_table) = 0; + virtual void UpdateTitleBar() = 0; // Updates internal state specifying whether the throbber is to be shown. // If the throbber was shown, and should still be shown, the frame of the @@ -120,21 +91,6 @@ class BrowserWindow { // Returns true if the frame is maximized (aka zoomed). virtual bool IsMaximized() = 0; - // TODO(beng): REMOVE - this work should be done entirely in the frames. - // Returns the bounds required to accomodate for some contents located at the - // provided rectangle. The result is in whatever coordinate system used for - // |content_rect|. - virtual gfx::Rect GetBoundsForContentBounds(const gfx::Rect content_rect) = 0; - - // Invoked by the InfoBubble when it is shown/hidden. XPFrame/VistaFrame use - // this notification to make sure they render as active even though they are - // not active while the bubble is shown. - virtual void InfoBubbleShowing() = 0; - // The implementation for this sends WM_NCACTIVATE with a value of FALSE for - // the window. Subclasses that need to customize should be sure and invoke - // this implementation too. - virtual void InfoBubbleClosing(); - // Returns the star button. virtual ToolbarStarToggle* GetStarButton() const = 0; @@ -147,29 +103,21 @@ class BrowserWindow { // Returns the Bookmark Bar view. virtual BookmarkBarView* GetBookmarkBarView() = 0; - // Returns the BrowserView. - // TODO(beng): remove this! temporary only! - virtual BrowserView* GetBrowserView() const = 0; - // Updates the toolbar with the state for the specified |contents|. virtual void UpdateToolbar(TabContents* contents, bool should_restore_state) = 0; - // Updates the UI with the specified Profile. - // TODO(beng): REMOVE - virtual void ProfileChanged(Profile* profile) {} - // Focuses the toolbar (for accessibility). virtual void FocusToolbar() = 0; + // Returns whether the bookmark bar is visible or not. + virtual bool IsBookmarkBarVisible() const = 0; + // Construct a BrowserWindow implementation for the specified |browser|. static BrowserWindow* CreateBrowserWindow(Browser* browser, const gfx::Rect& bounds, int show_command); - // Returns whether the bookmark bar is visible or not. - virtual bool IsBookmarkBarVisible() const = 0; - protected: friend class BrowserList; friend class BrowserView; |