| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 return; | 63 return; |
| 64 | 64 |
| 65 views::Widget* window = views::Widget::CreateWindow( | 65 views::Widget* window = views::Widget::CreateWindow( |
| 66 new FirstRunSearchEngineView( | 66 new FirstRunSearchEngineView( |
| 67 profile, randomize_search_engine_experiment)); | 67 profile, randomize_search_engine_experiment)); |
| 68 DCHECK(window); | 68 DCHECK(window); |
| 69 | 69 |
| 70 window->SetAlwaysOnTop(true); | 70 window->SetAlwaysOnTop(true); |
| 71 window->Show(); | 71 window->Show(); |
| 72 views::AcceleratorHandler accelerator_handler; | 72 views::AcceleratorHandler accelerator_handler; |
| 73 MessageLoopForUI::current()->Run(&accelerator_handler); | 73 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); |
| 74 window->Close(); | 74 window->Close(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace first_run | 77 } // namespace first_run |
| 78 | 78 |
| 79 SearchEngineChoice::SearchEngineChoice(views::ButtonListener* listener, | 79 SearchEngineChoice::SearchEngineChoice(views::ButtonListener* listener, |
| 80 const TemplateURL* search_engine, | 80 const TemplateURL* search_engine, |
| 81 bool use_small_logos) | 81 bool use_small_logos) |
| 82 : NativeTextButton( | 82 : NativeTextButton( |
| 83 listener, | 83 listener, |
| (...skipping 378 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 |