| Index: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
|
| diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
|
| index c7941c628158b9a0336d4ff09bfcc470ab02b283..67a09180f5bac8864c7eeb94d27566b619f847ae 100644
|
| --- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
|
| +++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
|
| @@ -78,6 +78,8 @@
|
| #include "content/public/common/content_switches.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/base/webui/web_ui_util.h"
|
| +#include "ui/display/display.h"
|
| +#include "ui/display/screen.h"
|
|
|
| namespace chromeos {
|
|
|
| @@ -331,10 +333,13 @@ OobeUI::OobeUI(content::WebUI* web_ui, const GURL& url)
|
| // TabHelper is required for OOBE webui to make webview working on it.
|
| content::WebContents* contents = web_ui->GetWebContents();
|
| extensions::TabHelper::CreateForWebContents(contents);
|
| +
|
| + display::Screen::GetScreen()->AddObserver(this);
|
| }
|
|
|
| OobeUI::~OobeUI() {
|
| network_dropdown_handler_->RemoveObserver(GetView<ErrorScreenHandler>());
|
| + display::Screen::GetScreen()->RemoveObserver(this);
|
| if (ash_util::IsRunningInMash()) {
|
| // TODO: Ash needs to expose screen dimming api. See
|
| // http://crbug.com/646034.
|
| @@ -435,6 +440,23 @@ UserBoardView* OobeUI::GetUserBoardView() {
|
| return GetView<UserBoardScreenHandler>();
|
| }
|
|
|
| +void OobeUI::OnDisplayAdded(const display::Display& new_display) {}
|
| +
|
| +void OobeUI::OnDisplayRemoved(const display::Display& old_display) {}
|
| +
|
| +void OobeUI::OnDisplayMetricsChanged(const display::Display& display,
|
| + uint32_t changed_metrics) {
|
| + display::Display primary_display =
|
| + display::Screen::GetScreen()->GetPrimaryDisplay();
|
| + if (display.id() != primary_display.id() ||
|
| + !(changed_metrics & DISPLAY_METRIC_BOUNDS)) {
|
| + return;
|
| + }
|
| +
|
| + const gfx::Size& size = primary_display.size();
|
| + GetCoreOobeView()->SetClientAreaSize(size.width(), size.height());
|
| +}
|
| +
|
| void OobeUI::OnShutdownPolicyChanged(bool reboot_on_shutdown) {
|
| core_handler_->UpdateShutdownAndRebootVisibility(reboot_on_shutdown);
|
| }
|
|
|