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_DIALOG_CLIENT_VIEW_H_ | 5 #ifndef UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
6 #define UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 6 #define UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
7 | 7 |
8 #include "ui/gfx/font.h" | 8 #include "ui/gfx/font.h" |
9 #include "ui/views/controls/button/button.h" | 9 #include "ui/views/controls/button/button.h" |
10 #include "ui/views/focus/focus_manager.h" | 10 #include "ui/views/focus/focus_manager.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 80 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
81 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 81 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; |
82 virtual void Layout() OVERRIDE; | 82 virtual void Layout() OVERRIDE; |
83 virtual void ViewHierarchyChanged(bool is_add, View* parent, | 83 virtual void ViewHierarchyChanged(bool is_add, View* parent, |
84 View* child) OVERRIDE; | 84 View* child) OVERRIDE; |
85 virtual gfx::Size GetPreferredSize() OVERRIDE; | 85 virtual gfx::Size GetPreferredSize() OVERRIDE; |
86 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 86 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
87 | 87 |
88 // ButtonListener implementation: | 88 // ButtonListener implementation: |
89 virtual void ButtonPressed(Button* sender, | 89 virtual void ButtonPressed(Button* sender, |
90 const views::Event& event) OVERRIDE; | 90 const ui::Event& event) OVERRIDE; |
91 | 91 |
92 private: | 92 private: |
93 // Paint the size box in the bottom right corner of the window if it is | 93 // Paint the size box in the bottom right corner of the window if it is |
94 // resizable. | 94 // resizable. |
95 void PaintSizeBox(gfx::Canvas* canvas); | 95 void PaintSizeBox(gfx::Canvas* canvas); |
96 | 96 |
97 // Returns the width of the specified dialog button using the correct font. | 97 // Returns the width of the specified dialog button using the correct font. |
98 int GetButtonWidth(int button) const; | 98 int GetButtonWidth(int button) const; |
99 | 99 |
100 // Returns the greater of ok and cancel button's preferred height. | 100 // Returns the greater of ok and cancel button's preferred height. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 // When ancestor gets changed focus manager gets changed as well. | 155 // When ancestor gets changed focus manager gets changed as well. |
156 FocusManager* saved_focus_manager_; | 156 FocusManager* saved_focus_manager_; |
157 | 157 |
158 DISALLOW_COPY_AND_ASSIGN(DialogClientView); | 158 DISALLOW_COPY_AND_ASSIGN(DialogClientView); |
159 }; | 159 }; |
160 | 160 |
161 } // namespace views | 161 } // namespace views |
162 | 162 |
163 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 163 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
OLD | NEW |