Index: chrome/browser/ui/views/constrained_window_frame_simple.h |
diff --git a/chrome/browser/ui/views/constrained_window_frame_simple.h b/chrome/browser/ui/views/constrained_window_frame_simple.h |
index 1f5d03f8b2276661be28cff96ade907fb7513e14..2a0e6ccc3170e525a6b802532d3270729847d8f9 100644 |
--- a/chrome/browser/ui/views/constrained_window_frame_simple.h |
+++ b/chrome/browser/ui/views/constrained_window_frame_simple.h |
@@ -5,19 +5,33 @@ |
#ifndef CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_FRAME_SIMPLE_H_ |
#define CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_FRAME_SIMPLE_H_ |
+#include "base/memory/scoped_ptr.h" |
+#include "ui/views/controls/button/button.h" |
#include "ui/views/window/non_client_view.h" |
class ConstrainedWindowViews; |
+namespace views { |
+class ImageButton; |
+class LayoutManager; |
+} |
+ |
//////////////////////////////////////////////////////////////////////////////// |
// ConstrainedWindowFrameView |
// Provides a custom Window frame for ConstrainedWindowViews. |
// Implements a simple window with a minimal frame. |
-class ConstrainedWindowFrameSimple : public views::NonClientFrameView { |
+class ConstrainedWindowFrameSimple : public views::NonClientFrameView, |
+ public views::ButtonListener { |
public: |
explicit ConstrainedWindowFrameSimple(ConstrainedWindowViews* container); |
virtual ~ConstrainedWindowFrameSimple() {} |
+ void SetHeaderView(views::View* view); |
+ |
+ enum ButtonTag { |
+ CLOSE_WIDGET |
Ben Goodger (Google)
2012/09/27 16:16:12
rather than use tag (which we are moving away from
Mike Wittman
2012/09/28 22:46:09
Done.
|
+ }; |
+ |
private: |
// Overridden from views::NonClientFrameView: |
virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
@@ -25,9 +39,27 @@ class ConstrainedWindowFrameSimple : public views::NonClientFrameView { |
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 {} |
+ gfx::Path* window_mask) OVERRIDE; |
+ virtual void ResetWindowControls() OVERRIDE; |
+ virtual void UpdateWindowIcon() OVERRIDE; |
+ |
+ // Overridden from View: |
+ virtual gfx::Size GetPreferredSize() OVERRIDE; |
+ |
+ // Overridden from ButtonListener |
+ virtual void ButtonPressed(views::Button* sender, |
+ const ui::Event& event) OVERRIDE; |
+ |
+ views::View* CreateDefaultHeaderView(); |
+ |
+ views::ImageButton* CreateCloseButton(); |
+ |
+ ConstrainedWindowViews* container_; |
+ |
+ views::LayoutManager* layout_; |
+ |
+ // A weak pointer to the view used to render the header. |
+ View* header_view_; |
DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowFrameSimple); |
}; |