Commit f200986d authored by Kush Sinha's avatar Kush Sinha Committed by Commit Bot

Fix Chrome OS Account Manager welcome screens UI

Please check the attached bug for context.

The screen needs to be:
  - Frameless (no title bar or 'X' button).
  - Non-draggable.
to conform to other current Chrome OS welcome dialogs.

Bug: 968143
Change-Id: Idcd85d37aa1985dd02002674d47996b76f96cc68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1642067Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Kush Sinha <sinhak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665868}
parent 14073bd2
......@@ -36,6 +36,7 @@ a {
#google-logo {
height: 32px;
margin-top: 40px;
width: 32px;
}
......
......@@ -14,6 +14,7 @@
#include "chrome/common/webui_url_constants.h"
#include "components/prefs/pref_service.h"
#include "ui/aura/window.h"
#include "ui/wm/core/shadow_types.h"
#include "url/gurl.h"
namespace chromeos {
......@@ -63,6 +64,13 @@ bool AccountManagerWelcomeDialog::ShowIfRequired() {
return true;
}
void AccountManagerWelcomeDialog::AdjustWidgetInitParams(
views::Widget::InitParams* params) {
params->type = views::Widget::InitParams::Type::TYPE_WINDOW_FRAMELESS;
params->shadow_type = views::Widget::InitParams::ShadowType::SHADOW_TYPE_DROP;
params->shadow_elevation = wm::kShadowElevationActiveWindow;
}
void AccountManagerWelcomeDialog::OnDialogClosed(
const std::string& json_retval) {
chrome::SettingsWindowManager::GetInstance()->ShowOSSettings(
......
......@@ -24,6 +24,7 @@ class AccountManagerWelcomeDialog : public SystemWebDialogDelegate {
~AccountManagerWelcomeDialog() override;
// ui::SystemWebDialogDelegate overrides.
void AdjustWidgetInitParams(views::Widget::InitParams* params) override;
void OnDialogClosed(const std::string& json_retval) override;
void GetDialogSize(gfx::Size* size) const override;
std::string GetDialogArgs() const override;
......
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/chromeos/account_migration_welcome_dialog.h"
#include <string>
#include "base/json/json_writer.h"
......@@ -9,13 +11,13 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/settings_window_manager_chromeos.h"
#include "chrome/browser/ui/webui/chromeos/account_migration_welcome_dialog.h"
#include "chrome/browser/ui/webui/chromeos/account_migration_welcome_ui.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/webui_url_constants.h"
#include "components/prefs/pref_service.h"
#include "net/base/url_util.h"
#include "ui/aura/window.h"
#include "ui/wm/core/shadow_types.h"
namespace chromeos {
......@@ -58,6 +60,13 @@ AccountMigrationWelcomeDialog* AccountMigrationWelcomeDialog::Show(
return dialog;
}
void AccountMigrationWelcomeDialog::AdjustWidgetInitParams(
views::Widget::InitParams* params) {
params->type = views::Widget::InitParams::Type::TYPE_WINDOW_FRAMELESS;
params->shadow_type = views::Widget::InitParams::ShadowType::SHADOW_TYPE_DROP;
params->shadow_elevation = wm::kShadowElevationActiveWindow;
}
std::string AccountMigrationWelcomeDialog::GetUserEmail() const {
return email_;
}
......
......@@ -24,6 +24,7 @@ class AccountMigrationWelcomeDialog : public SystemWebDialogDelegate {
~AccountMigrationWelcomeDialog() override;
// ui::SystemWebDialogDelegate overrides.
void AdjustWidgetInitParams(views::Widget::InitParams* params) override;
void GetDialogSize(gfx::Size* size) const override;
std::string GetDialogArgs() const override;
bool ShouldShowDialogTitle() const override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment