OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/controls/tabbed_pane/native_tabbed_pane_win.h" | 5 #include "views/controls/tabbed_pane/native_tabbed_pane_win.h" |
6 | 6 |
7 #include <vssym32.h> | 7 #include <vssym32.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 NativeControlWin::ViewHierarchyChanged(is_add, parent, child); | 357 NativeControlWin::ViewHierarchyChanged(is_add, parent, child); |
358 | 358 |
359 if (is_add && (child == this) && content_window_) { | 359 if (is_add && (child == this) && content_window_) { |
360 // We have been added to a view hierarchy, update the FocusTraversable | 360 // We have been added to a view hierarchy, update the FocusTraversable |
361 // parent. | 361 // parent. |
362 content_window_->SetFocusTraversableParent( | 362 content_window_->SetFocusTraversableParent( |
363 GetWidget()->GetFocusTraversable()); | 363 GetWidget()->GetFocusTraversable()); |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 Widget* NativeTabbedPaneWin::GetChildWidget() { | |
368 return content_window_; | |
369 } | |
370 | |
371 //////////////////////////////////////////////////////////////////////////////// | 367 //////////////////////////////////////////////////////////////////////////////// |
372 // NativeTabbedPaneWin, private: | 368 // NativeTabbedPaneWin, private: |
373 | 369 |
374 void NativeTabbedPaneWin::InitializeTabs() { | 370 void NativeTabbedPaneWin::InitializeTabs() { |
375 for (size_t i = 0; i < tab_titles_.size(); ++i) | 371 for (size_t i = 0; i < tab_titles_.size(); ++i) |
376 AddNativeTab(i, tab_titles_[i]); | 372 AddNativeTab(i, tab_titles_[i]); |
377 | 373 |
378 View* content_root = content_window_->GetRootView(); | 374 View* content_root = content_window_->GetRootView(); |
379 for (std::vector<View*>::iterator tab(tab_views_.begin()); | 375 for (std::vector<View*>::iterator tab(tab_views_.begin()); |
380 tab != tab_views_.end(); ++tab) | 376 tab != tab_views_.end(); ++tab) |
(...skipping 21 matching lines...) Expand all Loading... |
402 //////////////////////////////////////////////////////////////////////////////// | 398 //////////////////////////////////////////////////////////////////////////////// |
403 // NativeTabbedPaneWrapper, public: | 399 // NativeTabbedPaneWrapper, public: |
404 | 400 |
405 // static | 401 // static |
406 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( | 402 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( |
407 TabbedPane* tabbed_pane) { | 403 TabbedPane* tabbed_pane) { |
408 return new NativeTabbedPaneWin(tabbed_pane); | 404 return new NativeTabbedPaneWin(tabbed_pane); |
409 } | 405 } |
410 | 406 |
411 } // namespace views | 407 } // namespace views |
OLD | NEW |