| 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 | 65 |
| 66 views::Window* window = views::Window::CreateChromeWindow( | 66 views::Window* window = views::Window::CreateChromeWindow( |
| 67 NULL, | 67 NULL, |
| 68 gfx::Rect(), | 68 gfx::Rect(), |
| 69 new FirstRunSearchEngineView( | 69 new FirstRunSearchEngineView( |
| 70 profile, randomize_search_engine_experiment)); | 70 profile, randomize_search_engine_experiment)); |
| 71 DCHECK(window); | 71 DCHECK(window); |
| 72 | 72 |
| 73 window->SetAlwaysOnTop(true); | 73 window->SetIsAlwaysOnTop(true); |
| 74 window->Show(); | 74 window->Show(); |
| 75 views::AcceleratorHandler accelerator_handler; | 75 views::AcceleratorHandler accelerator_handler; |
| 76 MessageLoopForUI::current()->Run(&accelerator_handler); | 76 MessageLoopForUI::current()->Run(&accelerator_handler); |
| 77 window->Close(); | 77 window->Close(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace first_run | 80 } // namespace first_run |
| 81 | 81 |
| 82 SearchEngineChoice::SearchEngineChoice(views::ButtonListener* listener, | 82 SearchEngineChoice::SearchEngineChoice(views::ButtonListener* listener, |
| 83 const TemplateURL* search_engine, | 83 const TemplateURL* search_engine, |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 } | 458 } |
| 459 | 459 |
| 460 void FirstRunSearchEngineView::GetAccessibleState( | 460 void FirstRunSearchEngineView::GetAccessibleState( |
| 461 ui::AccessibleViewState* state) { | 461 ui::AccessibleViewState* state) { |
| 462 state->role = ui::AccessibilityTypes::ROLE_ALERT; | 462 state->role = ui::AccessibilityTypes::ROLE_ALERT; |
| 463 } | 463 } |
| 464 | 464 |
| 465 std::wstring FirstRunSearchEngineView::GetWindowTitle() const { | 465 std::wstring FirstRunSearchEngineView::GetWindowTitle() const { |
| 466 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_FIRSTRUN_DLG_TITLE)); | 466 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_FIRSTRUN_DLG_TITLE)); |
| 467 } | 467 } |
| OLD | NEW |