Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 2700303002: cros: Unify oobe View/Actor naming to just View. (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/login/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/wallpaper/wallpaper_controller.h" 10 #include "ash/common/wallpaper/wallpaper_controller.h"
(...skipping 23 matching lines...) Expand all
34 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" 34 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h"
35 #include "chrome/browser/chromeos/first_run/first_run.h" 35 #include "chrome/browser/chromeos/first_run/first_run.h"
36 #include "chrome/browser/chromeos/input_method/input_method_util.h" 36 #include "chrome/browser/chromeos/input_method/input_method_util.h"
37 #include "chrome/browser/chromeos/language_preferences.h" 37 #include "chrome/browser/chromeos/language_preferences.h"
38 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h" 38 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h"
39 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 39 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
40 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h" 40 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h"
41 #include "chrome/browser/chromeos/login/existing_user_controller.h" 41 #include "chrome/browser/chromeos/login/existing_user_controller.h"
42 #include "chrome/browser/chromeos/login/helper.h" 42 #include "chrome/browser/chromeos/login/helper.h"
43 #include "chrome/browser/chromeos/login/login_wizard.h" 43 #include "chrome/browser/chromeos/login/login_wizard.h"
44 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" 44 #include "chrome/browser/chromeos/login/screens/core_oobe_view.h"
45 #include "chrome/browser/chromeos/login/signin/token_handle_util.h" 45 #include "chrome/browser/chromeos/login/signin/token_handle_util.h"
46 #include "chrome/browser/chromeos/login/startup_utils.h" 46 #include "chrome/browser/chromeos/login/startup_utils.h"
47 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" 47 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
48 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h" 48 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h"
49 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" 49 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
50 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 50 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
51 #include "chrome/browser/chromeos/login/wizard_controller.h" 51 #include "chrome/browser/chromeos/login/wizard_controller.h"
52 #include "chrome/browser/chromeos/mobile_config.h" 52 #include "chrome/browser/chromeos/mobile_config.h"
53 #include "chrome/browser/chromeos/net/delay_network_call.h" 53 #include "chrome/browser/chromeos/net/delay_network_call.h"
54 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 54 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 } 1017 }
1018 1018
1019 //////////////////////////////////////////////////////////////////////////////// 1019 ////////////////////////////////////////////////////////////////////////////////
1020 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver: 1020 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver:
1021 1021
1022 void LoginDisplayHostImpl::OnKeyboardBoundsChanging( 1022 void LoginDisplayHostImpl::OnKeyboardBoundsChanging(
1023 const gfx::Rect& new_bounds) { 1023 const gfx::Rect& new_bounds) {
1024 if (new_bounds.IsEmpty()) { 1024 if (new_bounds.IsEmpty()) {
1025 // Keyboard has been hidden. 1025 // Keyboard has been hidden.
1026 if (GetOobeUI()) 1026 if (GetOobeUI())
1027 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(true); 1027 GetOobeUI()->GetCoreOobeView()->ShowControlBar(true);
1028 } else if (!new_bounds.IsEmpty()) { 1028 } else if (!new_bounds.IsEmpty()) {
1029 // Keyboard has been shown. 1029 // Keyboard has been shown.
1030 if (GetOobeUI()) 1030 if (GetOobeUI())
1031 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); 1031 GetOobeUI()->GetCoreOobeView()->ShowControlBar(false);
1032 } 1032 }
1033 } 1033 }
1034 1034
1035 void LoginDisplayHostImpl::OnKeyboardClosed() {} 1035 void LoginDisplayHostImpl::OnKeyboardClosed() {}
1036 1036
1037 //////////////////////////////////////////////////////////////////////////////// 1037 ////////////////////////////////////////////////////////////////////////////////
1038 // LoginDisplayHostImpl, display::DisplayObserver: 1038 // LoginDisplayHostImpl, display::DisplayObserver:
1039 1039
1040 void LoginDisplayHostImpl::OnDisplayAdded(const display::Display& new_display) { 1040 void LoginDisplayHostImpl::OnDisplayAdded(const display::Display& new_display) {
1041 } 1041 }
1042 1042
1043 void LoginDisplayHostImpl::OnDisplayRemoved( 1043 void LoginDisplayHostImpl::OnDisplayRemoved(
1044 const display::Display& old_display) {} 1044 const display::Display& old_display) {}
1045 1045
1046 void LoginDisplayHostImpl::OnDisplayMetricsChanged( 1046 void LoginDisplayHostImpl::OnDisplayMetricsChanged(
1047 const display::Display& display, 1047 const display::Display& display,
1048 uint32_t changed_metrics) { 1048 uint32_t changed_metrics) {
1049 display::Display primary_display = 1049 display::Display primary_display =
1050 display::Screen::GetScreen()->GetPrimaryDisplay(); 1050 display::Screen::GetScreen()->GetPrimaryDisplay();
1051 if (display.id() != primary_display.id() || 1051 if (display.id() != primary_display.id() ||
1052 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { 1052 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) {
1053 return; 1053 return;
1054 } 1054 }
1055 1055
1056 if (GetOobeUI()) { 1056 if (GetOobeUI()) {
1057 const gfx::Size& size = primary_display.size(); 1057 const gfx::Size& size = primary_display.size();
1058 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), 1058 GetOobeUI()->GetCoreOobeView()->SetClientAreaSize(size.width(),
1059 size.height()); 1059 size.height());
1060 } 1060 }
1061 } 1061 }
1062 1062
1063 //////////////////////////////////////////////////////////////////////////////// 1063 ////////////////////////////////////////////////////////////////////////////////
1064 // LoginDisplayHostImpl, views::WidgetRemovalsObserver: 1064 // LoginDisplayHostImpl, views::WidgetRemovalsObserver:
1065 void LoginDisplayHostImpl::OnWillRemoveView(views::Widget* widget, 1065 void LoginDisplayHostImpl::OnWillRemoveView(views::Widget* widget,
1066 views::View* view) { 1066 views::View* view) {
1067 if (view != static_cast<views::View*>(login_view_)) 1067 if (view != static_cast<views::View*>(login_view_))
1068 return; 1068 return;
1069 login_view_ = nullptr; 1069 login_view_ = nullptr;
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 if (!login_prompt_visible_time_.is_null()) 1322 if (!login_prompt_visible_time_.is_null())
1323 return; 1323 return;
1324 login_prompt_visible_time_ = base::TimeTicks::Now(); 1324 login_prompt_visible_time_ = base::TimeTicks::Now();
1325 TryToPlayStartupSound(); 1325 TryToPlayStartupSound();
1326 } 1326 }
1327 1327
1328 // static 1328 // static
1329 void LoginDisplayHostImpl::DisableRestrictiveProxyCheckForTest() { 1329 void LoginDisplayHostImpl::DisableRestrictiveProxyCheckForTest() {
1330 static_cast<chromeos::LoginDisplayHostImpl*>(default_host()) 1330 static_cast<chromeos::LoginDisplayHostImpl*>(default_host())
1331 ->GetOobeUI() 1331 ->GetOobeUI()
1332 ->GetGaiaScreenActor() 1332 ->GetGaiaScreenView()
1333 ->DisableRestrictiveProxyCheckForTest(); 1333 ->DisableRestrictiveProxyCheckForTest();
1334 } 1334 }
1335 1335
1336 //////////////////////////////////////////////////////////////////////////////// 1336 ////////////////////////////////////////////////////////////////////////////////
1337 // external 1337 // external
1338 1338
1339 // Declared in login_wizard.h so that others don't need to depend on our .h. 1339 // Declared in login_wizard.h so that others don't need to depend on our .h.
1340 // TODO(nkostylev): Split this into a smaller functions. 1340 // TODO(nkostylev): Split this into a smaller functions.
1341 void ShowLoginWizard(OobeScreen first_screen) { 1341 void ShowLoginWizard(OobeScreen first_screen) {
1342 if (browser_shutdown::IsTryingToQuit()) 1342 if (browser_shutdown::IsTryingToQuit())
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 // Chrome locale. Otherwise it will be lost if Chrome restarts. 1460 // Chrome locale. Otherwise it will be lost if Chrome restarts.
1461 // Don't need to schedule pref save because setting initial local 1461 // Don't need to schedule pref save because setting initial local
1462 // will enforce preference saving. 1462 // will enforce preference saving.
1463 prefs->SetString(prefs::kApplicationLocale, locale); 1463 prefs->SetString(prefs::kApplicationLocale, locale);
1464 StartupUtils::SetInitialLocale(locale); 1464 StartupUtils::SetInitialLocale(locale);
1465 1465
1466 TriggerShowLoginWizardFinish(locale, std::move(data)); 1466 TriggerShowLoginWizardFinish(locale, std::move(data));
1467 } 1467 }
1468 1468
1469 } // namespace chromeos 1469 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698