diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-26 04:15:47 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-26 04:15:47 +0000 |
commit | a5d62f388bf57ad19bc37e634710d67d30293f57 (patch) | |
tree | 01365ae8ec224a9d0a1c860ba6bf1cf38051951c | |
parent | 6693d3ea3592e25cd014d1a006f2410b5e4b2dc6 (diff) | |
download | chromium_src-a5d62f388bf57ad19bc37e634710d67d30293f57.zip chromium_src-a5d62f388bf57ad19bc37e634710d67d30293f57.tar.gz chromium_src-a5d62f388bf57ad19bc37e634710d67d30293f57.tar.bz2 |
Use NativeViewHostViews when using pure-views instead of NativeViewHostGtk.
This fixes a crash when running chrome with --use-pure-views --views-desktop
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7263017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90520 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | views/controls/native/native_view_host_gtk.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/views/controls/native/native_view_host_gtk.cc b/views/controls/native/native_view_host_gtk.cc index 833e4b4..6c709f8 100644 --- a/views/controls/native/native_view_host_gtk.cc +++ b/views/controls/native/native_view_host_gtk.cc @@ -9,9 +9,11 @@ #include "base/logging.h" #include "views/controls/native/native_view_host.h" +#include "views/controls/native/native_view_host_views.h" #include "views/focus/focus_manager.h" #include "views/widget/gtk_views_fixed.h" #include "views/widget/native_widget_gtk.h" +#include "views/widget/widget.h" namespace views { @@ -375,7 +377,10 @@ gboolean NativeViewHostGtk::CallFocusIn(GtkWidget* widget, // static NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( NativeViewHost* host) { - return new NativeViewHostGtk(host); + if (Widget::IsPureViews()) + return new NativeViewHostViews(host); + else + return new NativeViewHostGtk(host); } } // namespace views |