| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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") |
| 11 #include <shellapi.h> | 11 #include <shellapi.h> |
| 12 #include <vsstyle.h> | 12 #include <vsstyle.h> |
| 13 #include <vssym32.h> | 13 #include <vssym32.h> |
| 14 | 14 |
| 15 #include "app/gfx/chrome_canvas.h" | 15 #include "app/gfx/canvas.h" |
| 16 #include "app/resource_bundle.h" | 16 #include "app/resource_bundle.h" |
| 17 #include "base/file_util.h" | 17 #include "base/file_util.h" |
| 18 #include "base/path_service.h" | 18 #include "base/path_service.h" |
| 19 #include "base/gfx/native_theme.h" | 19 #include "base/gfx/native_theme.h" |
| 20 #include "chrome/browser/browser.h" | 20 #include "chrome/browser/browser.h" |
| 21 #include "chrome/browser/browser_list.h" | 21 #include "chrome/browser/browser_list.h" |
| 22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
| 23 #include "chrome/browser/download/download_manager.h" | 23 #include "chrome/browser/download/download_manager.h" |
| 24 #include "chrome/browser/gears_integration.h" | 24 #include "chrome/browser/gears_integration.h" |
| 25 #include "chrome/browser/metrics/metrics_service.h" | 25 #include "chrome/browser/metrics/metrics_service.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 55 class ListBackground : public views::Background { | 55 class ListBackground : public views::Background { |
| 56 public: | 56 public: |
| 57 explicit ListBackground() { | 57 explicit ListBackground() { |
| 58 SkColor list_color = | 58 SkColor list_color = |
| 59 gfx::NativeTheme::instance()->GetThemeColorWithDefault( | 59 gfx::NativeTheme::instance()->GetThemeColorWithDefault( |
| 60 gfx::NativeTheme::LIST, 1, TS_NORMAL, TMT_FILLCOLOR, COLOR_WINDOW); | 60 gfx::NativeTheme::LIST, 1, TS_NORMAL, TMT_FILLCOLOR, COLOR_WINDOW); |
| 61 SetNativeControlColor(list_color); | 61 SetNativeControlColor(list_color); |
| 62 } | 62 } |
| 63 virtual ~ListBackground() {} | 63 virtual ~ListBackground() {} |
| 64 | 64 |
| 65 virtual void Paint(ChromeCanvas* canvas, views::View* view) const { | 65 virtual void Paint(gfx::Canvas* canvas, views::View* view) const { |
| 66 HDC dc = canvas->beginPlatformPaint(); | 66 HDC dc = canvas->beginPlatformPaint(); |
| 67 RECT native_lb = view->GetLocalBounds(true).ToRECT(); | 67 RECT native_lb = view->GetLocalBounds(true).ToRECT(); |
| 68 gfx::NativeTheme::instance()->PaintListBackground(dc, true, &native_lb); | 68 gfx::NativeTheme::instance()->PaintListBackground(dc, true, &native_lb); |
| 69 canvas->endPlatformPaint(); | 69 canvas->endPlatformPaint(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 DISALLOW_COPY_AND_ASSIGN(ListBackground); | 73 DISALLOW_COPY_AND_ASSIGN(ListBackground); |
| 74 }; | 74 }; |
| 75 | 75 |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 | 1174 |
| 1175 void AdvancedScrollViewContainer::Layout() { | 1175 void AdvancedScrollViewContainer::Layout() { |
| 1176 gfx::Rect lb = GetLocalBounds(false); | 1176 gfx::Rect lb = GetLocalBounds(false); |
| 1177 | 1177 |
| 1178 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( | 1178 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( |
| 1179 gfx::NativeTheme::LIST); | 1179 gfx::NativeTheme::LIST); |
| 1180 lb.Inset(border.width(), border.height()); | 1180 lb.Inset(border.width(), border.height()); |
| 1181 scroll_view_->SetBounds(lb); | 1181 scroll_view_->SetBounds(lb); |
| 1182 scroll_view_->Layout(); | 1182 scroll_view_->Layout(); |
| 1183 } | 1183 } |
| OLD | NEW |