Chromium Code Reviews| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 352 | 352 |
| 353 int NativeTabbedPaneViews::GetTabCount() { | 353 int NativeTabbedPaneViews::GetTabCount() { |
| 354 return tab_strip_->child_count(); | 354 return tab_strip_->child_count(); |
| 355 } | 355 } |
| 356 | 356 |
| 357 int NativeTabbedPaneViews::GetSelectedTabIndex() { | 357 int NativeTabbedPaneViews::GetSelectedTabIndex() { |
| 358 return tab_strip_->GetSelectedIndex(); | 358 return tab_strip_->GetSelectedIndex(); |
| 359 } | 359 } |
| 360 | 360 |
| 361 View* NativeTabbedPaneViews::GetSelectedTab() { | 361 View* NativeTabbedPaneViews::GetSelectedTab() { |
| 362 return tab_strip_->selected_tab(); | 362 //return tab_strip_->selected_tab(); |
|
msw
2012/07/25 20:19:27
nit: WIP, I know, sorry :p
markusheintz_
2012/07/26 18:21:35
:) done.
| |
| 363 return content_view_->child_at(GetSelectedTabIndex()); | |
| 363 } | 364 } |
| 364 | 365 |
| 365 View* NativeTabbedPaneViews::GetView() { | 366 View* NativeTabbedPaneViews::GetView() { |
| 366 return this; | 367 return this; |
| 367 } | 368 } |
| 368 | 369 |
| 369 void NativeTabbedPaneViews::SetFocus() { | 370 void NativeTabbedPaneViews::SetFocus() { |
| 370 // Focus the associated HWND. | 371 // Focus the associated HWND. |
| 371 OnFocus(); | 372 OnFocus(); |
| 372 } | 373 } |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 402 if (tab_strip_->has_children()) | 403 if (tab_strip_->has_children()) |
| 403 InitializeTabs(); | 404 InitializeTabs(); |
| 404 } | 405 } |
| 405 | 406 |
| 406 void NativeTabbedPaneViews::InitializeTabs() { | 407 void NativeTabbedPaneViews::InitializeTabs() { |
| 407 for (int i = 0; i < tab_strip_->child_count(); ++i) | 408 for (int i = 0; i < tab_strip_->child_count(); ++i) |
| 408 content_view_->AddChildView(Tab::GetContents(tab_strip_->child_at(i))); | 409 content_view_->AddChildView(Tab::GetContents(tab_strip_->child_at(i))); |
| 409 } | 410 } |
| 410 | 411 |
| 411 } // namespace views | 412 } // namespace views |
| OLD | NEW |