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

Side by Side Diff: chrome/browser/ui/views/notifications/balloon_view_host.cc

Issue 7834048: Preliminary work to allow Chrome to build with USE_AURA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/notifications/balloon_view_host.h" 5 #include "chrome/browser/ui/views/notifications/balloon_view_host.h"
6 6
7 #include "chrome/browser/notifications/balloon.h" 7 #include "chrome/browser/notifications/balloon.h"
8 #include "content/browser/renderer_host/render_view_host.h" 8 #include "content/browser/renderer_host/render_view_host.h"
9 #include "content/browser/renderer_host/render_widget_host_view.h" 9 #include "content/browser/renderer_host/render_widget_host_view.h"
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 BalloonHost::Init(); 57 BalloonHost::Init();
58 } 58 }
59 59
60 void BalloonViewHost::InitRenderWidgetHostView() { 60 void BalloonViewHost::InitRenderWidgetHostView() {
61 DCHECK(render_view_host_); 61 DCHECK(render_view_host_);
62 62
63 render_widget_host_view_ = 63 render_widget_host_view_ =
64 RenderWidgetHostView::CreateViewForWidget(render_view_host_); 64 RenderWidgetHostView::CreateViewForWidget(render_view_host_);
65 65
66 // TODO(johnnyg): http://crbug.com/23954. Need a cross-platform solution. 66 // TODO(johnnyg): http://crbug.com/23954. Need a cross-platform solution.
67 #if defined(OS_WIN) 67 #if defined(USE_AURA)
68 // TODO(beng): (same as touch_ui probably).
69 NOTIMPLEMENTED();
70 #elif defined(OS_WIN)
68 RenderWidgetHostViewWin* view_win = 71 RenderWidgetHostViewWin* view_win =
69 static_cast<RenderWidgetHostViewWin*>(render_widget_host_view_); 72 static_cast<RenderWidgetHostViewWin*>(render_widget_host_view_);
70 73
71 // Create the HWND. 74 // Create the HWND.
72 HWND hwnd = view_win->Create(parent_native_view_); 75 HWND hwnd = view_win->Create(parent_native_view_);
73 view_win->ShowWindow(SW_SHOW); 76 view_win->ShowWindow(SW_SHOW);
74 native_host_->Attach(hwnd); 77 native_host_->Attach(hwnd);
75 #elif defined(TOOLKIT_USES_GTK) 78 #elif defined(TOOLKIT_USES_GTK)
76 #if defined(TOUCH_UI) 79 #if defined(TOUCH_UI)
77 RenderWidgetHostViewViews* view_views = 80 RenderWidgetHostViewViews* view_views =
78 static_cast<RenderWidgetHostViewViews*>(render_widget_host_view_); 81 static_cast<RenderWidgetHostViewViews*>(render_widget_host_view_);
79 view_views->InitAsChild(); 82 view_views->InitAsChild();
80 native_host_->AttachToView(view_views); 83 native_host_->AttachToView(view_views);
81 #else 84 #else
82 RenderWidgetHostViewGtk* view_gtk = 85 RenderWidgetHostViewGtk* view_gtk =
83 static_cast<RenderWidgetHostViewGtk*>(render_widget_host_view_); 86 static_cast<RenderWidgetHostViewGtk*>(render_widget_host_view_);
84 view_gtk->InitAsChild(); 87 view_gtk->InitAsChild();
85 native_host_->Attach(view_gtk->native_view()); 88 native_host_->Attach(view_gtk->native_view());
86 #endif 89 #endif
87 #else 90 #else
88 NOTIMPLEMENTED(); 91 NOTIMPLEMENTED();
89 #endif 92 #endif
90 } 93 }
91 94
92 RenderWidgetHostView* BalloonViewHost::render_widget_host_view() const { 95 RenderWidgetHostView* BalloonViewHost::render_widget_host_view() const {
93 return render_widget_host_view_; 96 return render_widget_host_view_;
94 } 97 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/tabs/base_tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698