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

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: Created 3 years, 10 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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 } 1011 }
1012 1012
1013 //////////////////////////////////////////////////////////////////////////////// 1013 ////////////////////////////////////////////////////////////////////////////////
1014 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver: 1014 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver:
1015 1015
1016 void LoginDisplayHostImpl::OnKeyboardBoundsChanging( 1016 void LoginDisplayHostImpl::OnKeyboardBoundsChanging(
1017 const gfx::Rect& new_bounds) { 1017 const gfx::Rect& new_bounds) {
1018 if (new_bounds.IsEmpty()) { 1018 if (new_bounds.IsEmpty()) {
1019 // Keyboard has been hidden. 1019 // Keyboard has been hidden.
1020 if (GetOobeUI()) 1020 if (GetOobeUI())
1021 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(true); 1021 GetOobeUI()->GetCoreOobeView()->ShowControlBar(true);
1022 } else if (!new_bounds.IsEmpty()) { 1022 } else if (!new_bounds.IsEmpty()) {
1023 // Keyboard has been shown. 1023 // Keyboard has been shown.
1024 if (GetOobeUI()) 1024 if (GetOobeUI())
1025 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); 1025 GetOobeUI()->GetCoreOobeView()->ShowControlBar(false);
1026 } 1026 }
1027 } 1027 }
1028 1028
1029 void LoginDisplayHostImpl::OnKeyboardClosed() {} 1029 void LoginDisplayHostImpl::OnKeyboardClosed() {}
1030 1030
1031 //////////////////////////////////////////////////////////////////////////////// 1031 ////////////////////////////////////////////////////////////////////////////////
1032 // LoginDisplayHostImpl, display::DisplayObserver: 1032 // LoginDisplayHostImpl, display::DisplayObserver:
1033 1033
1034 void LoginDisplayHostImpl::OnDisplayAdded(const display::Display& new_display) { 1034 void LoginDisplayHostImpl::OnDisplayAdded(const display::Display& new_display) {
1035 } 1035 }
1036 1036
1037 void LoginDisplayHostImpl::OnDisplayRemoved( 1037 void LoginDisplayHostImpl::OnDisplayRemoved(
1038 const display::Display& old_display) {} 1038 const display::Display& old_display) {}
1039 1039
1040 void LoginDisplayHostImpl::OnDisplayMetricsChanged( 1040 void LoginDisplayHostImpl::OnDisplayMetricsChanged(
1041 const display::Display& display, 1041 const display::Display& display,
1042 uint32_t changed_metrics) { 1042 uint32_t changed_metrics) {
1043 display::Display primary_display = 1043 display::Display primary_display =
1044 display::Screen::GetScreen()->GetPrimaryDisplay(); 1044 display::Screen::GetScreen()->GetPrimaryDisplay();
1045 if (display.id() != primary_display.id() || 1045 if (display.id() != primary_display.id() ||
1046 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { 1046 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) {
1047 return; 1047 return;
1048 } 1048 }
1049 1049
1050 if (GetOobeUI()) { 1050 if (GetOobeUI()) {
1051 const gfx::Size& size = primary_display.size(); 1051 const gfx::Size& size = primary_display.size();
1052 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), 1052 GetOobeUI()->GetCoreOobeView()->SetClientAreaSize(size.width(),
1053 size.height()); 1053 size.height());
1054 } 1054 }
1055 } 1055 }
1056 1056
1057 //////////////////////////////////////////////////////////////////////////////// 1057 ////////////////////////////////////////////////////////////////////////////////
1058 // LoginDisplayHostImpl, views::WidgetRemovalsObserver: 1058 // LoginDisplayHostImpl, views::WidgetRemovalsObserver:
1059 void LoginDisplayHostImpl::OnWillRemoveView(views::Widget* widget, 1059 void LoginDisplayHostImpl::OnWillRemoveView(views::Widget* widget,
1060 views::View* view) { 1060 views::View* view) {
1061 if (view != static_cast<views::View*>(login_view_)) 1061 if (view != static_cast<views::View*>(login_view_))
1062 return; 1062 return;
1063 login_view_ = nullptr; 1063 login_view_ = nullptr;
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 if (!login_prompt_visible_time_.is_null()) 1314 if (!login_prompt_visible_time_.is_null())
1315 return; 1315 return;
1316 login_prompt_visible_time_ = base::TimeTicks::Now(); 1316 login_prompt_visible_time_ = base::TimeTicks::Now();
1317 TryToPlayStartupSound(); 1317 TryToPlayStartupSound();
1318 } 1318 }
1319 1319
1320 // static 1320 // static
1321 void LoginDisplayHostImpl::DisableRestrictiveProxyCheckForTest() { 1321 void LoginDisplayHostImpl::DisableRestrictiveProxyCheckForTest() {
1322 static_cast<chromeos::LoginDisplayHostImpl*>(default_host()) 1322 static_cast<chromeos::LoginDisplayHostImpl*>(default_host())
1323 ->GetOobeUI() 1323 ->GetOobeUI()
1324 ->GetGaiaScreenActor() 1324 ->GetGaiaScreenView()
1325 ->DisableRestrictiveProxyCheckForTest(); 1325 ->DisableRestrictiveProxyCheckForTest();
1326 } 1326 }
1327 1327
1328 //////////////////////////////////////////////////////////////////////////////// 1328 ////////////////////////////////////////////////////////////////////////////////
1329 // external 1329 // external
1330 1330
1331 // Declared in login_wizard.h so that others don't need to depend on our .h. 1331 // Declared in login_wizard.h so that others don't need to depend on our .h.
1332 // TODO(nkostylev): Split this into a smaller functions. 1332 // TODO(nkostylev): Split this into a smaller functions.
1333 void ShowLoginWizard(OobeScreen first_screen) { 1333 void ShowLoginWizard(OobeScreen first_screen) {
1334 if (browser_shutdown::IsTryingToQuit()) 1334 if (browser_shutdown::IsTryingToQuit())
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 // Chrome locale. Otherwise it will be lost if Chrome restarts. 1452 // Chrome locale. Otherwise it will be lost if Chrome restarts.
1453 // Don't need to schedule pref save because setting initial local 1453 // Don't need to schedule pref save because setting initial local
1454 // will enforce preference saving. 1454 // will enforce preference saving.
1455 prefs->SetString(prefs::kApplicationLocale, locale); 1455 prefs->SetString(prefs::kApplicationLocale, locale);
1456 StartupUtils::SetInitialLocale(locale); 1456 StartupUtils::SetInitialLocale(locale);
1457 1457
1458 TriggerShowLoginWizardFinish(locale, std::move(data)); 1458 TriggerShowLoginWizardFinish(locale, std::move(data));
1459 } 1459 }
1460 1460
1461 } // namespace chromeos 1461 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698