#include "base/message_loop/message_loop.h"
#include "base/strings/string16.h"
#include "chrome/browser/process_singleton.h"
+#include "chrome/grit/chromium_strings.h"
+#include "chrome/grit/generated_resources.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/user_experiment.h"
-#include "grit/chromium_strings.h"
-#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/ui_resources.h"
+#include "ui/aura/window.h"
+#include "ui/aura/window_tree_host.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
+#include "ui/resources/grit/ui_resources.h"
+#include "ui/views/background.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
-#if defined(USE_AURA)
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#endif
-
namespace {
const wchar_t kHelpCenterUrl[] =
// An approximate window size. After Layout() we'll get better bounds.
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
- params.can_activate = true;
+ params.activatable = views::Widget::InitParams::ACTIVATABLE_YES;
params.bounds = gfx::Rect(310, 200);
popup_ = new views::Widget;
popup_->Init(params);
return DIALOG_ERROR;
}
views::Label* label = new views::Label(
- l10n_util::GetStringUTF16(experiment.heading));
- label->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont));
+ l10n_util::GetStringUTF16(experiment.heading),
+ rb.GetFontList(ui::ResourceBundle::MediumFont));
label->SetMultiLine(true);
label->SizeToFit(200);
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
views::LabelButton* accept_button = new views::LabelButton(
this, l10n_util::GetStringUTF16(IDS_OK));
- accept_button->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
+ accept_button->SetStyle(views::Button::STYLE_BUTTON);
accept_button->set_tag(BT_OK_BUTTON);
views::Separator* separator = NULL;
// this the button case.
views::LabelButton* cancel_button = new views::LabelButton(
this, l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL));
- cancel_button->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
+ cancel_button->SetStyle(views::Button::STYLE_BUTTON);
cancel_button->set_tag(BT_CLOSE_BUTTON);
layout->AddView(cancel_button);
}
// Carve the toast shape into the window.
HWND toast_window;
-#if defined(USE_AURA)
- toast_window =
- popup_->GetNativeView()->GetDispatcher()->GetAcceleratedWidget();
-#else
- toast_window = popup_->GetNativeView();
-#endif
+ toast_window = popup_->GetNativeView()->GetHost()->GetAcceleratedWidget();
SetToastRegion(toast_window, preferred.width(), preferred.height());
// Time to show the window in a modal loop.