summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-27 23:19:07 +0000
committernsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-27 23:19:07 +0000
commit4ec1c641017901aeba58911197f5c539897526bb (patch)
tree33851594ff52a945ce4a8e93ae933dd933f8957e
parentf86176464d705130ca6103043adfc3a4743e9f1c (diff)
downloadchromium_src-4ec1c641017901aeba58911197f5c539897526bb.zip
chromium_src-4ec1c641017901aeba58911197f5c539897526bb.tar.gz
chromium_src-4ec1c641017901aeba58911197f5c539897526bb.tar.bz2
Another case where we need to allow "this" in the constructor.
Review URL: http://codereview.chromium.org/248016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27354 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--views/examples/tabbed_pane_example.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/views/examples/tabbed_pane_example.h b/views/examples/tabbed_pane_example.h
index 9488566..283e355 100644
--- a/views/examples/tabbed_pane_example.h
+++ b/views/examples/tabbed_pane_example.h
@@ -5,6 +5,7 @@
#ifndef VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_
#define VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_
+#include "base/compiler_specific.h"
#include "base/string_util.h"
#include "views/controls/button/text_button.h"
#include "views/controls/tabbed_pane/tabbed_pane.h"
@@ -20,10 +21,14 @@ class TabbedPaneExample : protected ExampleBase,
TabbedPaneExample(views::TabbedPane* parent, views::Label* message)
: ExampleBase(message),
tabbed_pane_(new views::TabbedPane()),
- add_(new views::TextButton(this, L"Add")),
- add_at_(new views::TextButton(this, L"Add At 1")),
- remove_at_(new views::TextButton(this, L"Remove At 1")),
- select_at_(new views::TextButton(this, L"Select At 1")) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ add_(new views::TextButton(this, L"Add"))),
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ add_at_(new views::TextButton(this, L"Add At 1"))),
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ remove_at_(new views::TextButton(this, L"Remove At 1"))),
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ select_at_(new views::TextButton(this, L"Select At 1"))) {
views::View* container = new views::View();
parent->AddTab(L"Tabbed Pane", container);