| 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 ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_ | 5 #ifndef ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_ |
| 6 #define ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_ | 6 #define ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/views/controls/button/button.h" // ButtonListener | 10 #include "ui/views/controls/button/button.h" // ButtonListener |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual void ResetWindowControls() OVERRIDE; | 64 virtual void ResetWindowControls() OVERRIDE; |
| 65 virtual void UpdateWindowIcon() OVERRIDE; | 65 virtual void UpdateWindowIcon() OVERRIDE; |
| 66 virtual void UpdateWindowTitle() OVERRIDE; | 66 virtual void UpdateWindowTitle() OVERRIDE; |
| 67 | 67 |
| 68 // views::View overrides: | 68 // views::View overrides: |
| 69 virtual gfx::Size GetPreferredSize() OVERRIDE; | 69 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 70 virtual void Layout() OVERRIDE; | 70 virtual void Layout() OVERRIDE; |
| 71 virtual std::string GetClassName() const OVERRIDE; | 71 virtual std::string GetClassName() const OVERRIDE; |
| 72 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 72 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 73 virtual gfx::Size GetMinimumSize() OVERRIDE; | 73 virtual gfx::Size GetMinimumSize() OVERRIDE; |
| 74 virtual gfx::Size GetMaximumSize() OVERRIDE; |
| 74 | 75 |
| 75 // views::ButtonListener overrides: | 76 // views::ButtonListener overrides: |
| 76 virtual void ButtonPressed(views::Button* sender, | 77 virtual void ButtonPressed(views::Button* sender, |
| 77 const ui::Event& event) OVERRIDE; | 78 const ui::Event& event) OVERRIDE; |
| 78 | 79 |
| 79 private: | 80 private: |
| 80 // Height from top of window to top of client area. | 81 // Height from top of window to top of client area. |
| 81 int NonClientTopBorderHeight() const; | 82 int NonClientTopBorderHeight() const; |
| 82 | 83 |
| 83 // Not owned. | 84 // Not owned. |
| 84 views::Widget* frame_; | 85 views::Widget* frame_; |
| 85 | 86 |
| 86 ash::FrameMaximizeButton* maximize_button_; | 87 ash::FrameMaximizeButton* maximize_button_; |
| 87 views::ImageButton* close_button_; | 88 views::ImageButton* close_button_; |
| 88 views::ImageButton* window_icon_; | 89 views::ImageButton* window_icon_; |
| 89 | 90 |
| 90 scoped_ptr<FramePainter> frame_painter_; | 91 scoped_ptr<FramePainter> frame_painter_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh); | 93 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace ash | 96 } // namespace ash |
| 96 | 97 |
| 97 #endif // ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_ | 98 #endif // ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_ |
| OLD | NEW |