summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/first_run')
-rw-r--r--chrome/browser/first_run/try_chrome_dialog_view.cc15
-rw-r--r--chrome/browser/first_run/try_chrome_dialog_view.h2
2 files changed, 14 insertions, 3 deletions
diff --git a/chrome/browser/first_run/try_chrome_dialog_view.cc b/chrome/browser/first_run/try_chrome_dialog_view.cc
index d4bc8ef..3581acc 100644
--- a/chrome/browser/first_run/try_chrome_dialog_view.cc
+++ b/chrome/browser/first_run/try_chrome_dialog_view.cc
@@ -28,6 +28,11 @@
#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[] =
@@ -261,8 +266,14 @@ TryChromeDialogView::Result TryChromeDialogView::ShowModal(
popup_->SetBounds(pos);
// Carve the toast shape into the window.
- SetToastRegion(popup_->GetNativeView(),
- preferred.width(), preferred.height());
+ HWND toast_window;
+#if defined(USE_AURA)
+ toast_window =
+ popup_->GetNativeView()->GetRootWindow()->GetAcceleratedWidget();
+#else
+ toast_window = popup_->GetNativeView();
+#endif
+ SetToastRegion(toast_window, preferred.width(), preferred.height());
// Time to show the window in a modal loop. The ProcessSingleton should
// already be locked and it will not process WM_COPYDATA requests. Change the
diff --git a/chrome/browser/first_run/try_chrome_dialog_view.h b/chrome/browser/first_run/try_chrome_dialog_view.h
index 97c0df7..ef5a156 100644
--- a/chrome/browser/first_run/try_chrome_dialog_view.h
+++ b/chrome/browser/first_run/try_chrome_dialog_view.h
@@ -83,7 +83,7 @@ class TryChromeDialogView : public views::ButtonListener,
// Create a windows region that looks like a toast of width |w| and height
// |h|. This is best effort, so we don't care much if the operation fails.
- void SetToastRegion(gfx::NativeWindow window, int w, int h);
+ void SetToastRegion(HWND window, int w, int h);
// views::ButtonListener:
// We have two buttons and according to what the user clicked we set |result_|