Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: views/controls/tabbed_pane/native_tabbed_pane_win.cc

Issue 6881107: Rework the way Widget::Init works: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 0, 0, width(), height(), 284 0, 0, width(), height(),
285 GetWidget()->GetNativeView(), NULL, NULL, 285 GetWidget()->GetNativeView(), NULL, NULL,
286 NULL); 286 NULL);
287 ui::CheckWindowCreated(tab_control); 287 ui::CheckWindowCreated(tab_control);
288 288
289 HFONT font = ResourceBundle::GetSharedInstance(). 289 HFONT font = ResourceBundle::GetSharedInstance().
290 GetFont(ResourceBundle::BaseFont).GetNativeFont(); 290 GetFont(ResourceBundle::BaseFont).GetNativeFont();
291 SendMessage(tab_control, WM_SETFONT, reinterpret_cast<WPARAM>(font), FALSE); 291 SendMessage(tab_control, WM_SETFONT, reinterpret_cast<WPARAM>(font), FALSE);
292 292
293 // Create the view container which is a child of the TabControl. 293 // Create the view container which is a child of the TabControl.
294 content_window_ = Widget::CreateWidget( 294 content_window_ = Widget::CreateWidget();
295 Widget::CreateParams(Widget::CreateParams::TYPE_CONTROL)); 295 Widget::CreateParams params(Widget::CreateParams::TYPE_CONTROL);
296 content_window_->Init(tab_control, gfx::Rect()); 296 params.parent = tab_control;
297 content_window_->Init(params);
297 298
298 // Explicitly setting the WS_EX_LAYOUTRTL property for the HWND (see above 299 // Explicitly setting the WS_EX_LAYOUTRTL property for the HWND (see above
299 // for why we waited until |content_window_| is created before we set this 300 // for why we waited until |content_window_| is created before we set this
300 // property for the tabbed pane's HWND). 301 // property for the tabbed pane's HWND).
301 if (base::i18n::IsRTL()) 302 if (base::i18n::IsRTL())
302 l10n_util::HWNDSetRTLLayout(tab_control); 303 l10n_util::HWNDSetRTLLayout(tab_control);
303 304
304 RootView* root_view = content_window_->GetRootView(); 305 RootView* root_view = content_window_->GetRootView();
305 tab_layout_manager_ = new TabLayout(); 306 tab_layout_manager_ = new TabLayout();
306 root_view->SetLayoutManager(tab_layout_manager_); 307 root_view->SetLayoutManager(tab_layout_manager_);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 //////////////////////////////////////////////////////////////////////////////// 397 ////////////////////////////////////////////////////////////////////////////////
397 // NativeTabbedPaneWrapper, public: 398 // NativeTabbedPaneWrapper, public:
398 399
399 // static 400 // static
400 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( 401 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper(
401 TabbedPane* tabbed_pane) { 402 TabbedPane* tabbed_pane) {
402 return new NativeTabbedPaneWin(tabbed_pane); 403 return new NativeTabbedPaneWin(tabbed_pane);
403 } 404 }
404 405
405 } // namespace views 406 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/tabbed_pane/native_tabbed_pane_gtk.cc ('k') | views/controls/textfield/native_textfield_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698