OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/options/advanced_contents_view.h" | 5 #include "chrome/browser/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 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 layout->AddView(new SecuritySection(profile())); | 1376 layout->AddView(new SecuritySection(profile())); |
1377 } | 1377 } |
1378 | 1378 |
1379 //////////////////////////////////////////////////////////////////////////////// | 1379 //////////////////////////////////////////////////////////////////////////////// |
1380 // AdvancedContentsView, private: | 1380 // AdvancedContentsView, private: |
1381 | 1381 |
1382 void AdvancedContentsView::InitClass() { | 1382 void AdvancedContentsView::InitClass() { |
1383 static bool initialized = false; | 1383 static bool initialized = false; |
1384 if (!initialized) { | 1384 if (!initialized) { |
1385 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 1385 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
1386 line_height_ = rb.GetFont(ResourceBundle::BaseFont).height(); | 1386 line_height_ = rb.GetFont(ResourceBundle::BaseFont).GetHeight(); |
1387 initialized = true; | 1387 initialized = true; |
1388 } | 1388 } |
1389 } | 1389 } |
1390 | 1390 |
1391 //////////////////////////////////////////////////////////////////////////////// | 1391 //////////////////////////////////////////////////////////////////////////////// |
1392 // AdvancedScrollViewContainer, public: | 1392 // AdvancedScrollViewContainer, public: |
1393 | 1393 |
1394 AdvancedScrollViewContainer::AdvancedScrollViewContainer(Profile* profile) | 1394 AdvancedScrollViewContainer::AdvancedScrollViewContainer(Profile* profile) |
1395 : contents_view_(new AdvancedContentsView(profile)), | 1395 : contents_view_(new AdvancedContentsView(profile)), |
1396 scroll_view_(new views::ScrollView) { | 1396 scroll_view_(new views::ScrollView) { |
1397 AddChildView(scroll_view_); | 1397 AddChildView(scroll_view_); |
1398 scroll_view_->SetContents(contents_view_); | 1398 scroll_view_->SetContents(contents_view_); |
1399 set_background(new ListBackground()); | 1399 set_background(new ListBackground()); |
1400 } | 1400 } |
1401 | 1401 |
1402 AdvancedScrollViewContainer::~AdvancedScrollViewContainer() { | 1402 AdvancedScrollViewContainer::~AdvancedScrollViewContainer() { |
1403 } | 1403 } |
1404 | 1404 |
1405 //////////////////////////////////////////////////////////////////////////////// | 1405 //////////////////////////////////////////////////////////////////////////////// |
1406 // AdvancedScrollViewContainer, views::View overrides: | 1406 // AdvancedScrollViewContainer, views::View overrides: |
1407 | 1407 |
1408 void AdvancedScrollViewContainer::Layout() { | 1408 void AdvancedScrollViewContainer::Layout() { |
1409 gfx::Rect lb = GetLocalBounds(false); | 1409 gfx::Rect lb = GetLocalBounds(false); |
1410 | 1410 |
1411 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( | 1411 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( |
1412 gfx::NativeTheme::LIST); | 1412 gfx::NativeTheme::LIST); |
1413 lb.Inset(border.width(), border.height()); | 1413 lb.Inset(border.width(), border.height()); |
1414 scroll_view_->SetBounds(lb); | 1414 scroll_view_->SetBounds(lb); |
1415 } | 1415 } |
OLD | NEW |