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 "chrome/browser/ui/webui/options2/chromeos/display_options_handler.h" | 5 #include "chrome/browser/ui/webui/options2/chromeos/display_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "ash/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
10 #include "ash/display/output_configurator_animation.h" | 10 #include "ash/display/output_configurator_animation.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 DictionaryValue* localized_strings) { | 42 DictionaryValue* localized_strings) { |
43 DCHECK(localized_strings); | 43 DCHECK(localized_strings); |
44 RegisterTitle(localized_strings, "displayOptionsPage", | 44 RegisterTitle(localized_strings, "displayOptionsPage", |
45 IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_TAB_TITLE); | 45 IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_TAB_TITLE); |
46 localized_strings->SetString("startMirroring", l10n_util::GetStringUTF16( | 46 localized_strings->SetString("startMirroring", l10n_util::GetStringUTF16( |
47 IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_START_MIRRORING)); | 47 IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_START_MIRRORING)); |
48 localized_strings->SetString("stopMirroring", l10n_util::GetStringUTF16( | 48 localized_strings->SetString("stopMirroring", l10n_util::GetStringUTF16( |
49 IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_STOP_MIRRORING)); | 49 IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_STOP_MIRRORING)); |
50 } | 50 } |
51 | 51 |
52 void DisplayOptionsHandler::InitializeHandler() { | 52 void DisplayOptionsHandler::InitializePage() { |
53 DCHECK(web_ui()); | 53 DCHECK(web_ui()); |
54 UpdateDisplaySectionVisibility(); | 54 UpdateDisplaySectionVisibility(); |
55 } | 55 } |
56 | 56 |
57 void DisplayOptionsHandler::RegisterMessages() { | 57 void DisplayOptionsHandler::RegisterMessages() { |
58 web_ui()->RegisterMessageCallback( | 58 web_ui()->RegisterMessageCallback( |
59 "getDisplayInfo", | 59 "getDisplayInfo", |
60 base::Bind(&DisplayOptionsHandler::HandleDisplayInfo, | 60 base::Bind(&DisplayOptionsHandler::HandleDisplayInfo, |
61 base::Unretained(this))); | 61 base::Unretained(this))); |
62 web_ui()->RegisterMessageCallback( | 62 web_ui()->RegisterMessageCallback( |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 DCHECK_GE(DisplayController::LEFT, layout); | 170 DCHECK_GE(DisplayController::LEFT, layout); |
171 ash::Shell::GetInstance()->output_configurator_animation()-> | 171 ash::Shell::GetInstance()->output_configurator_animation()-> |
172 StartFadeOutAnimation(base::Bind( | 172 StartFadeOutAnimation(base::Bind( |
173 &DisplayOptionsHandler::FadeOutForDisplayLayoutFinished, | 173 &DisplayOptionsHandler::FadeOutForDisplayLayoutFinished, |
174 base::Unretained(this), | 174 base::Unretained(this), |
175 static_cast<int>(layout))); | 175 static_cast<int>(layout))); |
176 } | 176 } |
177 | 177 |
178 } // namespace options2 | 178 } // namespace options2 |
179 } // namespace chromeos | 179 } // namespace chromeos |
OLD | NEW |