public:
// Constructs a non-client view for an BrowserFrame.
OpaqueBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
- virtual ~OpaqueBrowserFrameView();
-
- // Overridden from BrowserNonClientFrameView:
- virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE;
- virtual int GetTopInset() const OVERRIDE;
- virtual int GetThemeBackgroundXInset() const OVERRIDE;
- virtual void UpdateThrobber(bool running) OVERRIDE;
- virtual gfx::Size GetMinimumSize() OVERRIDE;
-
- // Overridden from views::NonClientFrameView:
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
- virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE;
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
- virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask)
- OVERRIDE;
- virtual void ResetWindowControls() OVERRIDE;
- virtual void UpdateWindowIcon() OVERRIDE;
- virtual void UpdateWindowTitle() OVERRIDE;
-
- // Overridden from views::View:
- virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
- virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
-
- // Overridden from views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender, const ui::Event& event)
- OVERRIDE;
-
- // Overridden from views::MenuButtonListener:
- virtual void OnMenuButtonClicked(views::View* source, const gfx::Point& point)
- OVERRIDE;
-
- // Overridden from chrome::TabIconViewModel:
- virtual bool ShouldTabIconViewAnimate() const OVERRIDE;
- virtual gfx::ImageSkia GetFaviconForTabIconView() OVERRIDE;
+ ~OpaqueBrowserFrameView() override;
+
+ // BrowserNonClientFrameView:
+ gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override;
+ int GetTopInset() const override;
+ int GetThemeBackgroundXInset() const override;
+ void UpdateThrobber(bool running) override;
+ gfx::Size GetMinimumSize() const override;
+
+ // views::NonClientFrameView:
+ gfx::Rect GetBoundsForClientView() const override;
+ gfx::Rect GetWindowBoundsForClientBounds(
+ const gfx::Rect& client_bounds) const override;
+ int NonClientHitTest(const gfx::Point& point) override;
+ void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override;
+ void ResetWindowControls() override;
+ void UpdateWindowIcon() override;
+ void UpdateWindowTitle() override;
+ void SizeConstraintsChanged() override;
+
+ // views::View:
+ void GetAccessibleState(ui::AXViewState* state) override;
+
+ // views::ButtonListener:
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
+ // views::MenuButtonListener:
+ void OnMenuButtonClicked(views::View* source,
+ const gfx::Point& point) override;
+
+ // chrome::TabIconViewModel:
+ bool ShouldTabIconViewAnimate() const override;
+ gfx::ImageSkia GetFaviconForTabIconView() override;
// content::NotificationObserver implementation:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
// OpaqueBrowserFrameViewLayoutDelegate implementation:
- virtual bool ShouldShowWindowIcon() const OVERRIDE;
- virtual bool ShouldShowWindowTitle() const OVERRIDE;
- virtual base::string16 GetWindowTitle() const OVERRIDE;
- virtual int GetIconSize() const OVERRIDE;
- virtual bool ShouldLeaveOffsetNearTopBorder() const OVERRIDE;
- virtual gfx::Size GetBrowserViewMinimumSize() const OVERRIDE;
- virtual bool ShouldShowCaptionButtons() const OVERRIDE;
- virtual bool ShouldShowAvatar() const OVERRIDE;
- virtual bool IsRegularOrGuestSession() const OVERRIDE;
- virtual gfx::ImageSkia GetOTRAvatarIcon() const OVERRIDE;
- virtual bool IsMaximized() const OVERRIDE;
- virtual bool IsMinimized() const OVERRIDE;
- virtual bool IsFullscreen() const OVERRIDE;
- virtual bool IsTabStripVisible() const OVERRIDE;
- virtual int GetTabStripHeight() const OVERRIDE;
- virtual gfx::Size GetTabstripPreferredSize() const OVERRIDE;
+ bool ShouldShowWindowIcon() const override;
+ bool ShouldShowWindowTitle() const override;
+ base::string16 GetWindowTitle() const override;
+ int GetIconSize() const override;
+ bool ShouldLeaveOffsetNearTopBorder() const override;
+ gfx::Size GetBrowserViewMinimumSize() const override;
+ bool ShouldShowCaptionButtons() const override;
+ bool ShouldShowAvatar() const override;
+ bool IsRegularOrGuestSession() const override;
+ gfx::ImageSkia GetOTRAvatarIcon() const override;
+ bool IsMaximized() const override;
+ bool IsMinimized() const override;
+ bool IsFullscreen() const override;
+ bool IsTabStripVisible() const override;
+ int GetTabStripHeight() const override;
+ gfx::Size GetTabstripPreferredSize() const override;
protected:
views::ImageButton* minimize_button() const { return minimize_button_; }
views::ImageButton* restore_button() const { return restore_button_; }
views::ImageButton* close_button() const { return close_button_; }
- // Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ // views::View:
+ void OnPaint(gfx::Canvas* canvas) override;
private:
+ // views::NonClientFrameView:
+ bool DoesIntersectRect(const views::View* target,
+ const gfx::Rect& rect) const override;
+
// Creates, adds and returns a new image button with |this| as its listener.
// Memory is owned by the caller.
views::ImageButton* InitWindowCaptionButton(int normal_image_id,
// border height in order to increase the window draggable area.
int TopResizeHeight() const;
+ // Returns true if the specified point is within the avatar menu buttons.
+ bool IsWithinAvatarMenuButtons(const gfx::Point& point) const;
+
// Returns the thickness of the entire nonclient left, right, and bottom
// borders, including both the window frame and any client edge.
int NonClientBorderThickness() const;