| 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 22 matching lines...) Expand all Loading... |
| 33 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 33 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
| 34 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 34 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 35 #include "chrome/browser/shell_dialogs.h" | 35 #include "chrome/browser/shell_dialogs.h" |
| 36 #include "chrome/browser/views/browser_dialogs.h" | 36 #include "chrome/browser/views/browser_dialogs.h" |
| 37 #include "chrome/browser/views/clear_browsing_data.h" | 37 #include "chrome/browser/views/clear_browsing_data.h" |
| 38 #include "chrome/browser/views/list_background.h" | 38 #include "chrome/browser/views/list_background.h" |
| 39 #include "chrome/browser/views/options/content_settings_window_view.h" | 39 #include "chrome/browser/views/options/content_settings_window_view.h" |
| 40 #include "chrome/browser/views/options/fonts_languages_window_view.h" | 40 #include "chrome/browser/views/options/fonts_languages_window_view.h" |
| 41 #include "chrome/browser/views/restart_message_box.h" | 41 #include "chrome/browser/views/restart_message_box.h" |
| 42 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
| 43 #include "gfx/canvas.h" | 43 #include "gfx/canvas_skia.h" |
| 44 #include "gfx/native_theme_win.h" | 44 #include "gfx/native_theme_win.h" |
| 45 #include "grit/app_resources.h" | 45 #include "grit/app_resources.h" |
| 46 #include "grit/chromium_strings.h" | 46 #include "grit/chromium_strings.h" |
| 47 #include "grit/generated_resources.h" | 47 #include "grit/generated_resources.h" |
| 48 #include "grit/locale_settings.h" | 48 #include "grit/locale_settings.h" |
| 49 #include "net/base/ssl_config_service_win.h" | 49 #include "net/base/ssl_config_service_win.h" |
| 50 #include "skia/ext/skia_utils_win.h" | 50 #include "skia/ext/skia_utils_win.h" |
| 51 #include "third_party/skia/include/core/SkBitmap.h" | 51 #include "third_party/skia/include/core/SkBitmap.h" |
| 52 #include "views/background.h" | 52 #include "views/background.h" |
| 53 #include "views/controls/button/checkbox.h" | 53 #include "views/controls/button/checkbox.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 if (base::i18n::IsRTL()) { | 128 if (base::i18n::IsRTL()) { |
| 129 string16 localized_file_path; | 129 string16 localized_file_path; |
| 130 base::i18n::WrapPathWithLTRFormatting(file_path, &localized_file_path); | 130 base::i18n::WrapPathWithLTRFormatting(file_path, &localized_file_path); |
| 131 text_field_->SetText(UTF16ToWide(localized_file_path)); | 131 text_field_->SetText(UTF16ToWide(localized_file_path)); |
| 132 } else { | 132 } else { |
| 133 text_field_->SetText(file_path.ToWStringHack()); | 133 text_field_->SetText(file_path.ToWStringHack()); |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 | 136 |
| 137 void FileDisplayArea::Paint(gfx::Canvas* canvas) { | 137 void FileDisplayArea::Paint(gfx::Canvas* canvas) { |
| 138 HDC dc = canvas->beginPlatformPaint(); | 138 HDC dc = canvas->AsCanvasSkia()->beginPlatformPaint(); |
| 139 RECT rect = { 0, 0, width(), height() }; | 139 RECT rect = { 0, 0, width(), height() }; |
| 140 gfx::NativeTheme::instance()->PaintTextField( | 140 gfx::NativeTheme::instance()->PaintTextField( |
| 141 dc, EP_EDITTEXT, ETS_READONLY, 0, &rect, | 141 dc, EP_EDITTEXT, ETS_READONLY, 0, &rect, |
| 142 skia::SkColorToCOLORREF(text_field_background_color_), true, true); | 142 skia::SkColorToCOLORREF(text_field_background_color_), true, true); |
| 143 canvas->endPlatformPaint(); | 143 canvas->AsCanvasSkia()->endPlatformPaint(); |
| 144 // Mirror left point for icon_bounds_ to draw icon in RTL locales correctly. | 144 // Mirror left point for icon_bounds_ to draw icon in RTL locales correctly. |
| 145 canvas->DrawBitmapInt(default_folder_icon_, | 145 canvas->DrawBitmapInt(default_folder_icon_, |
| 146 MirroredLeftPointForRect(icon_bounds_), | 146 MirroredLeftPointForRect(icon_bounds_), |
| 147 icon_bounds_.y()); | 147 icon_bounds_.y()); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void FileDisplayArea::Layout() { | 150 void FileDisplayArea::Layout() { |
| 151 icon_bounds_.SetRect(kFileIconHorizontalSpacing, kFileIconVerticalSpacing, | 151 icon_bounds_.SetRect(kFileIconHorizontalSpacing, kFileIconVerticalSpacing, |
| 152 kFileIconSize, kFileIconSize); | 152 kFileIconSize, kFileIconSize); |
| 153 gfx::Size ps = text_field_->GetPreferredSize(); | 153 gfx::Size ps = text_field_->GetPreferredSize(); |
| (...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 | 1416 |
| 1417 void AdvancedScrollViewContainer::Layout() { | 1417 void AdvancedScrollViewContainer::Layout() { |
| 1418 gfx::Rect lb = GetLocalBounds(false); | 1418 gfx::Rect lb = GetLocalBounds(false); |
| 1419 | 1419 |
| 1420 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( | 1420 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( |
| 1421 gfx::NativeTheme::LIST); | 1421 gfx::NativeTheme::LIST); |
| 1422 lb.Inset(border.width(), border.height()); | 1422 lb.Inset(border.width(), border.height()); |
| 1423 scroll_view_->SetBounds(lb); | 1423 scroll_view_->SetBounds(lb); |
| 1424 scroll_view_->Layout(); | 1424 scroll_view_->Layout(); |
| 1425 } | 1425 } |
| OLD | NEW |