| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 5 #ifndef CHROME_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
| 6 #define CHROME_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 6 #define CHROME_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/common/gfx/chrome_font.h" | 8 #include "chrome/common/gfx/chrome_font.h" |
| 9 #include "chrome/views/focus/focus_manager.h" | 9 #include "chrome/views/focus/focus_manager.h" |
| 10 #include "chrome/views/controls/button/button.h" | 10 #include "chrome/views/controls/button/button.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // ButtonListener implementation: | 71 // ButtonListener implementation: |
| 72 virtual void ButtonPressed(Button* sender); | 72 virtual void ButtonPressed(Button* sender); |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 // Paint the size box in the bottom right corner of the window if it is | 75 // Paint the size box in the bottom right corner of the window if it is |
| 76 // resizable. | 76 // resizable. |
| 77 void PaintSizeBox(ChromeCanvas* canvas); | 77 void PaintSizeBox(ChromeCanvas* canvas); |
| 78 | 78 |
| 79 // Returns the width of the specified dialog button using the correct font. | 79 // Returns the width of the specified dialog button using the correct font. |
| 80 int GetButtonWidth(int button) const; | 80 int GetButtonWidth(int button) const; |
| 81 int DialogClientView::GetButtonsHeight() const; | 81 int GetButtonsHeight() const; |
| 82 | 82 |
| 83 // Position and size various sub-views. | 83 // Position and size various sub-views. |
| 84 void LayoutDialogButtons(); | 84 void LayoutDialogButtons(); |
| 85 void LayoutContentsView(); | 85 void LayoutContentsView(); |
| 86 | 86 |
| 87 // Makes the specified button the default button. | 87 // Makes the specified button the default button. |
| 88 void SetDefaultButton(NativeButton* button); | 88 void SetDefaultButton(NativeButton* button); |
| 89 | 89 |
| 90 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } | 90 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } |
| 91 | 91 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 114 // Static resource initialization | 114 // Static resource initialization |
| 115 static void InitClass(); | 115 static void InitClass(); |
| 116 static ChromeFont* dialog_button_font_; | 116 static ChromeFont* dialog_button_font_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(DialogClientView); | 118 DISALLOW_COPY_AND_ASSIGN(DialogClientView); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace views | 121 } // namespace views |
| 122 | 122 |
| 123 #endif // #ifndef CHROME_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 123 #endif // #ifndef CHROME_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
| OLD | NEW |