OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/controls/tabbed_pane/native_tabbed_pane_views.h" | 5 #include "ui/views/controls/tabbed_pane/native_tabbed_pane_views.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
10 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 // Add tabs that are already added if any. | 389 // Add tabs that are already added if any. |
390 if (tab_strip_->has_children()) | 390 if (tab_strip_->has_children()) |
391 InitializeTabs(); | 391 InitializeTabs(); |
392 } | 392 } |
393 | 393 |
394 void NativeTabbedPaneViews::InitializeTabs() { | 394 void NativeTabbedPaneViews::InitializeTabs() { |
395 for (int i = 0; i < tab_strip_->child_count(); ++i) | 395 for (int i = 0; i < tab_strip_->child_count(); ++i) |
396 content_view_->AddChildView(Tab::GetContents(tab_strip_->child_at(i))); | 396 content_view_->AddChildView(Tab::GetContents(tab_strip_->child_at(i))); |
397 } | 397 } |
398 | 398 |
399 //////////////////////////////////////////////////////////////////////////////// | |
400 // NativeTabbedPaneWrapper, public: | |
401 | |
402 // static | |
403 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( | |
404 TabbedPane* tabbed_pane) { | |
405 return new NativeTabbedPaneViews(tabbed_pane); | |
406 } | |
407 | |
408 } // namespace views | 399 } // namespace views |
OLD | NEW |