| 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 #include "ui/views/window/dialog_client_view.h" | 5 #include "ui/views/window/dialog_client_view.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| 11 #include <uxtheme.h> | 11 #include <uxtheme.h> |
| 12 #include <vsstyle.h> | 12 #include <vsstyle.h> |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 #include <algorithm> | 15 #include <algorithm> |
| 16 | 16 |
| 17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
| 18 #include "grit/ui_strings.h" | 18 #include "grit/ui_strings.h" |
| 19 #include "ui/base/hit_test.h" | 19 #include "ui/base/hit_test.h" |
| 20 #include "ui/base/keycodes/keyboard_codes.h" | 20 #include "ui/base/keycodes/keyboard_codes.h" |
| 21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
| 22 #include "ui/base/native_theme/native_theme.h" |
| 22 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
| 23 #include "ui/gfx/canvas.h" | 24 #include "ui/gfx/canvas.h" |
| 24 #include "ui/gfx/font.h" | 25 #include "ui/gfx/font.h" |
| 25 #include "ui/base/native_theme/native_theme.h" | |
| 26 #include "ui/views/controls/button/text_button.h" | 26 #include "ui/views/controls/button/text_button.h" |
| 27 #include "ui/views/layout/layout_constants.h" | 27 #include "ui/views/layout/layout_constants.h" |
| 28 #include "ui/views/widget/root_view.h" | 28 #include "ui/views/widget/root_view.h" |
| 29 #include "ui/views/widget/widget.h" | 29 #include "ui/views/widget/widget.h" |
| 30 #include "ui/views/window/dialog_delegate.h" | 30 #include "ui/views/window/dialog_delegate.h" |
| 31 | 31 |
| 32 namespace views { | 32 namespace views { |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 const int kDialogMinButtonWidth = 75; | 35 const int kDialogMinButtonWidth = 75; |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 } | 523 } |
| 524 saved_focus_manager_ = focus_manager; | 524 saved_focus_manager_ = focus_manager; |
| 525 // Listen for focus change events so we can update the default button. | 525 // Listen for focus change events so we can update the default button. |
| 526 if (focus_manager) { | 526 if (focus_manager) { |
| 527 focus_manager->AddFocusChangeListener(this); | 527 focus_manager->AddFocusChangeListener(this); |
| 528 listening_to_focus_ = true; | 528 listening_to_focus_ = true; |
| 529 } | 529 } |
| 530 } | 530 } |
| 531 | 531 |
| 532 } // namespace views | 532 } // namespace views |
| OLD | NEW |