OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 5 #ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/frame/caption_buttons/frame_size_button_delegate.h" | 9 #include "ash/frame/caption_buttons/frame_size_button_delegate.h" |
10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // HTNOWHERE if |point| is not over any of the caption buttons. |point| must | 84 // HTNOWHERE if |point| is not over any of the caption buttons. |point| must |
85 // be in the coordinates of the FrameCaptionButtonContainerView. | 85 // be in the coordinates of the FrameCaptionButtonContainerView. |
86 int NonClientHitTest(const gfx::Point& point) const; | 86 int NonClientHitTest(const gfx::Point& point) const; |
87 | 87 |
88 // Updates the size button's visibility based on whether |frame_| can be | 88 // Updates the size button's visibility based on whether |frame_| can be |
89 // maximized and |force_hidden|. A parent view should relayout to reflect the | 89 // maximized and |force_hidden|. A parent view should relayout to reflect the |
90 // change in visibility. | 90 // change in visibility. |
91 void UpdateSizeButtonVisibility(bool force_hidden); | 91 void UpdateSizeButtonVisibility(bool force_hidden); |
92 | 92 |
93 // views::View: | 93 // views::View: |
94 virtual gfx::Size GetPreferredSize() OVERRIDE; | 94 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
95 virtual void Layout() OVERRIDE; | 95 virtual void Layout() OVERRIDE; |
96 virtual const char* GetClassName() const OVERRIDE; | 96 virtual const char* GetClassName() const OVERRIDE; |
97 | 97 |
98 private: | 98 private: |
99 friend class FrameCaptionButtonContainerViewTest; | 99 friend class FrameCaptionButtonContainerViewTest; |
100 | 100 |
101 struct ButtonIconIds { | 101 struct ButtonIconIds { |
102 ButtonIconIds(); | 102 ButtonIconIds(); |
103 ButtonIconIds(int icon_id, | 103 ButtonIconIds(int icon_id, |
104 int inactive_icon_id, | 104 int inactive_icon_id, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // Mapping of the images needed to paint a button for each of the values of | 148 // Mapping of the images needed to paint a button for each of the values of |
149 // CaptionButtonIcon. | 149 // CaptionButtonIcon. |
150 std::map<CaptionButtonIcon, ButtonIconIds> button_icon_id_map_; | 150 std::map<CaptionButtonIcon, ButtonIconIds> button_icon_id_map_; |
151 | 151 |
152 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); | 152 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); |
153 }; | 153 }; |
154 | 154 |
155 } // namesapace ash | 155 } // namesapace ash |
156 | 156 |
157 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 157 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
OLD | NEW |