| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ | 5 #ifndef UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ |
| 6 #define UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ | 6 #define UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // Overridden from NonClientFrameView: | 41 // Overridden from NonClientFrameView: |
| 42 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 42 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
| 43 virtual gfx::Rect GetWindowBoundsForClientBounds( | 43 virtual gfx::Rect GetWindowBoundsForClientBounds( |
| 44 const gfx::Rect& client_bounds) const OVERRIDE; | 44 const gfx::Rect& client_bounds) const OVERRIDE; |
| 45 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 45 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
| 46 virtual void GetWindowMask(const gfx::Size& size, | 46 virtual void GetWindowMask(const gfx::Size& size, |
| 47 gfx::Path* window_mask) OVERRIDE; | 47 gfx::Path* window_mask) OVERRIDE; |
| 48 virtual void ResetWindowControls() OVERRIDE; | 48 virtual void ResetWindowControls() OVERRIDE; |
| 49 virtual void UpdateWindowIcon() OVERRIDE; | 49 virtual void UpdateWindowIcon() OVERRIDE; |
| 50 virtual void UpdateWindowTitle() OVERRIDE; | 50 virtual void UpdateWindowTitle() OVERRIDE; |
| 51 virtual void SizeConstraintsChanged() OVERRIDE; |
| 51 | 52 |
| 52 // Overridden from View: | 53 // Overridden from View: |
| 53 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 54 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 54 virtual void Layout() OVERRIDE; | 55 virtual void Layout() OVERRIDE; |
| 55 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 56 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
| 56 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 57 virtual gfx::Size GetMinimumSize() const OVERRIDE; |
| 57 virtual gfx::Size GetMaximumSize() const OVERRIDE; | 58 virtual gfx::Size GetMaximumSize() const OVERRIDE; |
| 58 | 59 |
| 59 // Overridden from ButtonListener: | 60 // Overridden from ButtonListener: |
| 60 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; | 61 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 140 |
| 140 // The icon of this window. May be NULL. | 141 // The icon of this window. May be NULL. |
| 141 ImageButton* window_icon_; | 142 ImageButton* window_icon_; |
| 142 | 143 |
| 143 // Window caption buttons. | 144 // Window caption buttons. |
| 144 ImageButton* minimize_button_; | 145 ImageButton* minimize_button_; |
| 145 ImageButton* maximize_button_; | 146 ImageButton* maximize_button_; |
| 146 ImageButton* restore_button_; | 147 ImageButton* restore_button_; |
| 147 ImageButton* close_button_; | 148 ImageButton* close_button_; |
| 148 | 149 |
| 149 // Should maximize button be shown? | |
| 150 bool should_show_maximize_button_; | |
| 151 | |
| 152 // Background painter for the window frame. | 150 // Background painter for the window frame. |
| 153 scoped_ptr<FrameBackground> frame_background_; | 151 scoped_ptr<FrameBackground> frame_background_; |
| 154 | 152 |
| 155 // The horizontal boundaries for the title bar to layout within. Restricted | 153 // The horizontal boundaries for the title bar to layout within. Restricted |
| 156 // by the space used by the leading and trailing buttons. | 154 // by the space used by the leading and trailing buttons. |
| 157 int minimum_title_bar_x_; | 155 int minimum_title_bar_x_; |
| 158 int maximum_title_bar_x_; | 156 int maximum_title_bar_x_; |
| 159 | 157 |
| 160 DISALLOW_COPY_AND_ASSIGN(CustomFrameView); | 158 DISALLOW_COPY_AND_ASSIGN(CustomFrameView); |
| 161 }; | 159 }; |
| 162 | 160 |
| 163 } // namespace views | 161 } // namespace views |
| 164 | 162 |
| 165 #endif // UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ | 163 #endif // UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ |
| OLD | NEW |