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

Unified Diff: chrome/browser/ui/views/notifications/balloon_view_host.cc

Issue 8355042: aura: Use the existing notification system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/notifications/balloon_collection_views.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/notifications/balloon_view_host.cc
diff --git a/chrome/browser/ui/views/notifications/balloon_view_host.cc b/chrome/browser/ui/views/notifications/balloon_view_host.cc
index 952593c263bbbc1b02d2236479671bf1c6b4aad3..dd24447967b25afacbb18c58a2016c8ce583be49 100644
--- a/chrome/browser/ui/views/notifications/balloon_view_host.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view_host.cc
@@ -7,18 +7,18 @@
#include "chrome/browser/notifications/balloon.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#if defined(OS_WIN)
+#include "content/public/browser/content_browser_client.h"
+#include "views/widget/widget.h"
+
+#if defined(USE_AURA)
+#include "content/browser/renderer_host/render_widget_host_view_aura.h"
+#elif defined(OS_WIN)
#include "content/browser/renderer_host/render_widget_host_view_win.h"
-#endif
-#if defined(TOOLKIT_USES_GTK)
-#if defined(TOUCH_UI) || defined(USE_AURA)
+#elif defined(TOUCH_UI)
#include "chrome/browser/renderer_host/render_widget_host_view_views.h"
-#else
+#elif defined(TOOLKIT_USES_GTK)
#include "content/browser/renderer_host/render_widget_host_view_gtk.h"
#endif
-#endif
-#include "content/public/browser/content_browser_client.h"
-#include "views/widget/widget.h"
class BalloonViewHostView : public views::NativeViewHost {
public:
@@ -67,8 +67,11 @@ void BalloonViewHost::InitRenderWidgetHostView() {
// TODO(johnnyg): http://crbug.com/23954. Need a cross-platform solution.
#if defined(USE_AURA)
- // TODO(beng): (same as touch_ui probably).
- NOTIMPLEMENTED();
+ RenderWidgetHostViewAura* view_aura =
+ static_cast<RenderWidgetHostViewAura*>(render_widget_host_view_);
+ view_aura->Init();
+ view_aura->Show();
+ native_host_->Attach(view_aura->GetNativeView());
#elif defined(OS_WIN)
RenderWidgetHostViewWin* view_win =
static_cast<RenderWidgetHostViewWin*>(render_widget_host_view_);
@@ -77,18 +80,16 @@ void BalloonViewHost::InitRenderWidgetHostView() {
HWND hwnd = view_win->Create(parent_native_view_);
view_win->ShowWindow(SW_SHOW);
native_host_->Attach(hwnd);
-#elif defined(TOOLKIT_USES_GTK)
-#if defined(TOUCH_UI)
+#elif defined(TOUCH_UI)
RenderWidgetHostViewViews* view_views =
static_cast<RenderWidgetHostViewViews*>(render_widget_host_view_);
view_views->InitAsChild();
native_host_->AttachToView(view_views);
-#else
+#elif defined(TOOLKIT_USES_GTK)
RenderWidgetHostViewGtk* view_gtk =
static_cast<RenderWidgetHostViewGtk*>(render_widget_host_view_);
view_gtk->InitAsChild();
native_host_->Attach(view_gtk->native_view());
-#endif
#else
NOTIMPLEMENTED();
#endif
« no previous file with comments | « chrome/browser/notifications/balloon_collection_views.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698