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

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
Index: ui/views/test/test_views_delegate.cc
===================================================================
--- ui/views/test/test_views_delegate.cc (revision 156552)
+++ ui/views/test/test_views_delegate.cc (working copy)
@@ -4,8 +4,11 @@
#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"
+#include "ui/views/widget/desktop_native_widget_aura.h"
namespace views {
@@ -62,4 +65,12 @@
return NULL;
}
+NativeWidget* TestViewsDelegate::CreateNativeWidget(
+ internal::NativeWidgetDelegate* delegate,
+ gfx::NativeView parent) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWinAura))
+ return new DesktopNativeWidgetAura(delegate);
+ return NULL;
+}
+
} // namespace views
« no previous file with comments | « ui/views/test/test_views_delegate.h ('k') | ui/views/views.gyp » ('j') | ui/views/views.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698