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

Unified Diff: ui/views/test/test_views_delegate.cc

Issue 10913237: Allow the Views Delegate to provide the native widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/test/test_views_delegate.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/test_views_delegate.cc
===================================================================
--- ui/views/test/test_views_delegate.cc (revision 156649)
+++ ui/views/test/test_views_delegate.cc (working copy)
@@ -4,9 +4,15 @@
#include "ui/views/test/test_views_delegate.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "content/public/test/web_contents_tester.h"
+#include "ui/views/views_switches.h"
+#if defined(USE_AURA) && !defined(OS_CHROMEOS)
+#include "ui/views/widget/desktop_native_widget_aura.h"
+#endif
+
namespace views {
TestViewsDelegate::TestViewsDelegate()
@@ -62,4 +68,14 @@
return NULL;
}
+NativeWidget* TestViewsDelegate::CreateNativeWidget(
+ internal::NativeWidgetDelegate* delegate,
+ gfx::NativeView parent) {
+#if defined(USE_AURA) && !defined(OS_CHROMEOS)
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWinAura))
+ return new DesktopNativeWidgetAura(delegate);
+#endif
+ return NULL;
+}
+
} // namespace views
« no previous file with comments | « ui/views/test/test_views_delegate.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698