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

Unified Diff: ui/views/controls/tabbed_pane/tabbed_pane.cc

Issue 10797046: (Views only): Allow choosing between NativeTabbedPaneView and NativeTabbedPaneWin on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/controls/tabbed_pane/tabbed_pane.cc
diff --git a/ui/views/controls/tabbed_pane/tabbed_pane.cc b/ui/views/controls/tabbed_pane/tabbed_pane.cc
index b5dc08d965690596c543fe5a93e1d6f319309d87..beabd0c471f3a1969511c36733dde1c38f4bbdc6 100644
--- a/ui/views/controls/tabbed_pane/tabbed_pane.cc
+++ b/ui/views/controls/tabbed_pane/tabbed_pane.cc
@@ -8,10 +8,17 @@
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/views/controls/native/native_view_host.h"
+#include "ui/views/controls/tabbed_pane/native_tabbed_pane_views.h"
#include "ui/views/controls/tabbed_pane/native_tabbed_pane_wrapper.h"
#include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
#include "ui/views/widget/widget.h"
+// TODO(markusheintz): This should be removed once the native windows tabbed
+// pane is not used anymore.
msw 2012/07/20 23:50:51 ditto optional nit: include bug # and capitalize W
markusheintz_ 2012/07/23 12:22:06 Done.
+#if defined(OS_WIN) && !defined(USE_AURA)
+#include "ui/views/controls/tabbed_pane/native_tabbed_pane_win.h"
+#endif
+
namespace views {
// static
@@ -19,6 +26,9 @@ const char TabbedPane::kViewClassName[] = "views/TabbedPane";
TabbedPane::TabbedPane() : native_tabbed_pane_(NULL), listener_(NULL) {
set_focusable(true);
+#if defined(OS_WIN) && !defined(USE_AURA)
+ set_use_native_win_control(false);
msw 2012/07/20 23:50:51 Set this in the initializer list if it's not terri
markusheintz_ 2012/07/23 12:22:06 Done. The coding style looks a bit strange but it
+#endif
}
TabbedPane::~TabbedPane() {
@@ -140,4 +150,17 @@ void TabbedPane::GetAccessibleState(ui::AccessibleViewState* state) {
state->name = accessible_name_;
}
+///////////////////////////////////////////////////////////////////////////////
+// NativeTabbedPaneWrapper, public
+
+// static
+NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper(
msw 2012/07/20 23:50:51 Make this a static member on TabbedPane now and it
markusheintz_ 2012/07/23 12:22:06 True. This static method feels a bit alien in this
msw 2012/07/23 22:55:43 This sgtm, since it's really an internal detail of
+ TabbedPane* tabbed_pane) {
+#if defined(OS_WIN) && !defined(USE_AURA)
+ if (tabbed_pane->use_native_win_control())
+ return new NativeTabbedPaneWin(tabbed_pane);
+#endif
+ return new NativeTabbedPaneViews(tabbed_pane);
+}
+
} // namespace views

Powered by Google App Engine
This is Rietveld 408576698