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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 DWORD sys_color = ::GetSysColor(COLOR_3DHILIGHT); | 303 DWORD sys_color = ::GetSysColor(COLOR_3DHILIGHT); |
304 SkColor color = SkColorSetRGB(GetRValue(sys_color), GetGValue(sys_color), | 304 SkColor color = SkColorSetRGB(GetRValue(sys_color), GetGValue(sys_color), |
305 GetBValue(sys_color)); | 305 GetBValue(sys_color)); |
306 root_view->set_background(Background::CreateSolidBackground(color)); | 306 root_view->set_background(Background::CreateSolidBackground(color)); |
307 | 307 |
308 content_window_->SetFocusTraversableParentView(this); | 308 content_window_->SetFocusTraversableParentView(this); |
309 | 309 |
310 NativeControlCreated(tab_control); | 310 NativeControlCreated(tab_control); |
311 | 311 |
312 // Add tabs that are already added if any. | 312 // Add tabs that are already added if any. |
313 if (tab_views_.size() > 0) { | 313 if (!tab_views_.empty()) { |
314 InitializeTabs(); | 314 InitializeTabs(); |
315 if (selected_index_ >= 0) | 315 if (selected_index_ >= 0) |
316 DoSelectTabAt(selected_index_, false); | 316 DoSelectTabAt(selected_index_, false); |
317 } | 317 } |
318 | 318 |
319 ResizeContents(); | 319 ResizeContents(); |
320 } | 320 } |
321 | 321 |
322 bool NativeTabbedPaneWin::ProcessMessage(UINT message, | 322 bool NativeTabbedPaneWin::ProcessMessage(UINT message, |
323 WPARAM w_param, | 323 WPARAM w_param, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 //////////////////////////////////////////////////////////////////////////////// | 394 //////////////////////////////////////////////////////////////////////////////// |
395 // NativeTabbedPaneWrapper, public: | 395 // NativeTabbedPaneWrapper, public: |
396 | 396 |
397 // static | 397 // static |
398 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( | 398 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( |
399 TabbedPane* tabbed_pane) { | 399 TabbedPane* tabbed_pane) { |
400 return new NativeTabbedPaneWin(tabbed_pane); | 400 return new NativeTabbedPaneWin(tabbed_pane); |
401 } | 401 } |
402 | 402 |
403 } // namespace views | 403 } // namespace views |
OLD | NEW |