| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/views/first_run_search_engine_view.h" | 5 #include "chrome/browser/ui/views/first_run_search_engine_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "grit/google_chrome_strings.h" | 25 #include "grit/google_chrome_strings.h" |
| 26 #include "grit/locale_settings.h" | 26 #include "grit/locale_settings.h" |
| 27 #include "grit/theme_resources.h" | 27 #include "grit/theme_resources.h" |
| 28 #include "ui/base/accessibility/accessible_view_state.h" | 28 #include "ui/base/accessibility/accessible_view_state.h" |
| 29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
| 30 #include "ui/base/resource/resource_bundle.h" | 30 #include "ui/base/resource/resource_bundle.h" |
| 31 #include "ui/gfx/canvas.h" | 31 #include "ui/gfx/canvas.h" |
| 32 #include "ui/gfx/font.h" | 32 #include "ui/gfx/font.h" |
| 33 #include "ui/views/focus/accelerator_handler.h" | 33 #include "ui/views/focus/accelerator_handler.h" |
| 34 #include "ui/views/layout/layout_constants.h" | 34 #include "ui/views/layout/layout_constants.h" |
| 35 #include "ui/views/widget/widget.h" | |
| 36 #include "views/controls/button/button.h" | 35 #include "views/controls/button/button.h" |
| 37 #include "views/controls/image_view.h" | 36 #include "views/controls/image_view.h" |
| 38 #include "views/controls/label.h" | 37 #include "views/controls/label.h" |
| 39 #include "views/view_text_utils.h" | 38 #include "views/view_text_utils.h" |
| 39 #include "views/widget/widget.h" |
| 40 | 40 |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 // Size to scale logos down to if showing 4 instead of 3 choices. Logo images | 43 // Size to scale logos down to if showing 4 instead of 3 choices. Logo images |
| 44 // are all originally sized at 180 x 120 pixels, with the logo text baseline | 44 // are all originally sized at 180 x 120 pixels, with the logo text baseline |
| 45 // located 74 pixels beneath the top of the image. | 45 // located 74 pixels beneath the top of the image. |
| 46 const int kSmallLogoWidth = 132; | 46 const int kSmallLogoWidth = 132; |
| 47 const int kSmallLogoHeight = 88; | 47 const int kSmallLogoHeight = 88; |
| 48 | 48 |
| 49 // Used to pad text label height so it fits nicely in view. | 49 // Used to pad text label height so it fits nicely in view. |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 (*it)->SetText((*it)->GetSearchEngine()->short_name()); | 462 (*it)->SetText((*it)->GetSearchEngine()->short_name()); |
| 463 } | 463 } |
| 464 } | 464 } |
| 465 | 465 |
| 466 // This will tell screenreaders that they should read the full text | 466 // This will tell screenreaders that they should read the full text |
| 467 // of this dialog to the user now (rather than waiting for the user | 467 // of this dialog to the user now (rather than waiting for the user |
| 468 // to explore it). | 468 // to explore it). |
| 469 GetWidget()->NotifyAccessibilityEvent( | 469 GetWidget()->NotifyAccessibilityEvent( |
| 470 this, ui::AccessibilityTypes::EVENT_ALERT, true); | 470 this, ui::AccessibilityTypes::EVENT_ALERT, true); |
| 471 } | 471 } |
| OLD | NEW |