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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // Overridden from NonClientFrameView: | 39 // Overridden from NonClientFrameView: |
40 gfx::Rect GetBoundsForClientView() const override; | 40 gfx::Rect GetBoundsForClientView() const override; |
41 gfx::Rect GetWindowBoundsForClientBounds( | 41 gfx::Rect GetWindowBoundsForClientBounds( |
42 const gfx::Rect& client_bounds) const override; | 42 const gfx::Rect& client_bounds) const override; |
43 int NonClientHitTest(const gfx::Point& point) override; | 43 int NonClientHitTest(const gfx::Point& point) override; |
44 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override; | 44 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override; |
45 void ResetWindowControls() override; | 45 void ResetWindowControls() override; |
46 void UpdateWindowIcon() override; | 46 void UpdateWindowIcon() override; |
47 void UpdateWindowTitle() override; | 47 void UpdateWindowTitle() override; |
48 void SizeConstraintsChanged() override; | 48 void SizeConstraintsChanged() override; |
| 49 void ActivationChanged(bool active) override; |
49 | 50 |
50 // Overridden from View: | 51 // Overridden from View: |
51 void OnPaint(gfx::Canvas* canvas) override; | 52 void OnPaint(gfx::Canvas* canvas) override; |
52 void Layout() override; | 53 void Layout() override; |
53 gfx::Size GetPreferredSize() const override; | 54 gfx::Size GetPreferredSize() const override; |
54 gfx::Size GetMinimumSize() const override; | 55 gfx::Size GetMinimumSize() const override; |
55 gfx::Size GetMaximumSize() const override; | 56 gfx::Size GetMaximumSize() const override; |
56 | 57 |
57 // Overridden from ButtonListener: | 58 // Overridden from ButtonListener: |
58 void ButtonPressed(Button* sender, const ui::Event& event) override; | 59 void ButtonPressed(Button* sender, const ui::Event& event) override; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 ImageButton* close_button_; | 146 ImageButton* close_button_; |
146 | 147 |
147 // Background painter for the window frame. | 148 // Background painter for the window frame. |
148 std::unique_ptr<FrameBackground> frame_background_; | 149 std::unique_ptr<FrameBackground> frame_background_; |
149 | 150 |
150 // The horizontal boundaries for the title bar to layout within. Restricted | 151 // The horizontal boundaries for the title bar to layout within. Restricted |
151 // by the space used by the leading and trailing buttons. | 152 // by the space used by the leading and trailing buttons. |
152 int minimum_title_bar_x_; | 153 int minimum_title_bar_x_; |
153 int maximum_title_bar_x_; | 154 int maximum_title_bar_x_; |
154 | 155 |
| 156 // True if the frame containing this frameview is currently active. Updated in |
| 157 // ActivationChanged(). |
| 158 bool active_ = false; |
| 159 |
155 DISALLOW_COPY_AND_ASSIGN(CustomFrameView); | 160 DISALLOW_COPY_AND_ASSIGN(CustomFrameView); |
156 }; | 161 }; |
157 | 162 |
158 } // namespace views | 163 } // namespace views |
159 | 164 |
160 #endif // UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ | 165 #endif // UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ |
OLD | NEW |