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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 0, 0, width(), height(), | 285 0, 0, width(), height(), |
286 GetWidget()->GetNativeView(), NULL, NULL, | 286 GetWidget()->GetNativeView(), NULL, NULL, |
287 NULL); | 287 NULL); |
288 ui::CheckWindowCreated(tab_control); | 288 ui::CheckWindowCreated(tab_control); |
289 | 289 |
290 HFONT font = ResourceBundle::GetSharedInstance(). | 290 HFONT font = ResourceBundle::GetSharedInstance(). |
291 GetFont(ResourceBundle::BaseFont).GetNativeFont(); | 291 GetFont(ResourceBundle::BaseFont).GetNativeFont(); |
292 SendMessage(tab_control, WM_SETFONT, reinterpret_cast<WPARAM>(font), FALSE); | 292 SendMessage(tab_control, WM_SETFONT, reinterpret_cast<WPARAM>(font), FALSE); |
293 | 293 |
294 // Create the view container which is a child of the TabControl. | 294 // Create the view container which is a child of the TabControl. |
295 content_window_ = Widget::CreateWidget(); | 295 content_window_ = new Widget; |
296 Widget::InitParams params(Widget::InitParams::TYPE_CONTROL); | 296 Widget::InitParams params(Widget::InitParams::TYPE_CONTROL); |
297 params.parent = tab_control; | 297 params.parent = tab_control; |
298 content_window_->Init(params); | 298 content_window_->Init(params); |
299 | 299 |
300 // Explicitly setting the WS_EX_LAYOUTRTL property for the HWND (see above | 300 // Explicitly setting the WS_EX_LAYOUTRTL property for the HWND (see above |
301 // for why we waited until |content_window_| is created before we set this | 301 // for why we waited until |content_window_| is created before we set this |
302 // property for the tabbed pane's HWND). | 302 // property for the tabbed pane's HWND). |
303 if (base::i18n::IsRTL()) | 303 if (base::i18n::IsRTL()) |
304 l10n_util::HWNDSetRTLLayout(tab_control); | 304 l10n_util::HWNDSetRTLLayout(tab_control); |
305 | 305 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 //////////////////////////////////////////////////////////////////////////////// | 398 //////////////////////////////////////////////////////////////////////////////// |
399 // NativeTabbedPaneWrapper, public: | 399 // NativeTabbedPaneWrapper, public: |
400 | 400 |
401 // static | 401 // static |
402 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( | 402 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( |
403 TabbedPane* tabbed_pane) { | 403 TabbedPane* tabbed_pane) { |
404 return new NativeTabbedPaneWin(tabbed_pane); | 404 return new NativeTabbedPaneWin(tabbed_pane); |
405 } | 405 } |
406 | 406 |
407 } // namespace views | 407 } // namespace views |
OLD | NEW |