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 "chrome/browser/ui/views/options/advanced_contents_view.h" | 5 #include "chrome/browser/ui/views/options/advanced_contents_view.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <cryptuiapi.h> | 9 #include <cryptuiapi.h> |
10 #pragma comment(lib, "cryptui.lib") | 10 #pragma comment(lib, "cryptui.lib") |
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 void AdvancedContentsView::DidChangeBounds(const gfx::Rect& previous, | 1563 void AdvancedContentsView::DidChangeBounds(const gfx::Rect& previous, |
1564 const gfx::Rect& current) { | 1564 const gfx::Rect& current) { |
1565 // Override to do nothing. Calling Layout() interferes with our scrolling. | 1565 // Override to do nothing. Calling Layout() interferes with our scrolling. |
1566 } | 1566 } |
1567 | 1567 |
1568 | 1568 |
1569 //////////////////////////////////////////////////////////////////////////////// | 1569 //////////////////////////////////////////////////////////////////////////////// |
1570 // AdvancedContentsView, OptionsPageView implementation: | 1570 // AdvancedContentsView, OptionsPageView implementation: |
1571 | 1571 |
1572 void AdvancedContentsView::InitControlLayout() { | 1572 void AdvancedContentsView::InitControlLayout() { |
1573 GridLayout* layout = CreatePanelGridLayout(this); | 1573 GridLayout* layout = GridLayout::CreatePanel(this); |
1574 SetLayoutManager(layout); | 1574 SetLayoutManager(layout); |
1575 | 1575 |
1576 const int single_column_view_set_id = 0; | 1576 const int single_column_view_set_id = 0; |
1577 ColumnSet* column_set = layout->AddColumnSet(single_column_view_set_id); | 1577 ColumnSet* column_set = layout->AddColumnSet(single_column_view_set_id); |
1578 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, | 1578 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, |
1579 GridLayout::USE_PREF, 0, 0); | 1579 GridLayout::USE_PREF, 0, 0); |
1580 | 1580 |
1581 layout->StartRow(0, single_column_view_set_id); | 1581 layout->StartRow(0, single_column_view_set_id); |
1582 layout->AddView(new PrivacySection(profile())); | 1582 layout->AddView(new PrivacySection(profile())); |
1583 layout->StartRow(0, single_column_view_set_id); | 1583 layout->StartRow(0, single_column_view_set_id); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1637 // AdvancedScrollViewContainer, views::View overrides: | 1637 // AdvancedScrollViewContainer, views::View overrides: |
1638 | 1638 |
1639 void AdvancedScrollViewContainer::Layout() { | 1639 void AdvancedScrollViewContainer::Layout() { |
1640 gfx::Rect lb = GetLocalBounds(false); | 1640 gfx::Rect lb = GetLocalBounds(false); |
1641 | 1641 |
1642 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( | 1642 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( |
1643 gfx::NativeTheme::LIST); | 1643 gfx::NativeTheme::LIST); |
1644 lb.Inset(border.width(), border.height()); | 1644 lb.Inset(border.width(), border.height()); |
1645 scroll_view_->SetBounds(lb); | 1645 scroll_view_->SetBounds(lb); |
1646 } | 1646 } |
OLD | NEW |