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

Side by Side Diff: chrome/browser/views/options/content_page_view.cc

Issue 12842: Move convolver, image_operations, and skia_utils from base/gfx to skia/ext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <windows.h> 5 #include <windows.h>
6 #include <shlobj.h> 6 #include <shlobj.h>
7 #include <vsstyle.h> 7 #include <vsstyle.h>
8 #include <vssym32.h> 8 #include <vssym32.h>
9 9
10 #include "chrome/browser/views/options/content_page_view.h" 10 #include "chrome/browser/views/options/content_page_view.h"
11 11
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/gfx/native_theme.h" 13 #include "base/gfx/native_theme.h"
14 #include "base/gfx/skia_utils.h"
15 #include "chrome/app/theme/theme_resources.h" 14 #include "chrome/app/theme/theme_resources.h"
16 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/shell_dialogs.h" 16 #include "chrome/browser/shell_dialogs.h"
18 #include "chrome/browser/views/options/fonts_languages_window_view.h" 17 #include "chrome/browser/views/options/fonts_languages_window_view.h"
19 #include "chrome/browser/views/options/options_group_view.h" 18 #include "chrome/browser/views/options/options_group_view.h"
20 #include "chrome/browser/views/password_manager_view.h" 19 #include "chrome/browser/views/password_manager_view.h"
21 #include "chrome/browser/views/standard_layout.h" 20 #include "chrome/browser/views/standard_layout.h"
22 #include "chrome/common/gfx/chrome_canvas.h" 21 #include "chrome/common/gfx/chrome_canvas.h"
23 #include "chrome/common/l10n_util.h" 22 #include "chrome/common/l10n_util.h"
24 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
25 #include "chrome/common/pref_service.h" 24 #include "chrome/common/pref_service.h"
26 #include "chrome/common/resource_bundle.h" 25 #include "chrome/common/resource_bundle.h"
27 #include "chrome/views/checkbox.h" 26 #include "chrome/views/checkbox.h"
28 #include "chrome/views/grid_layout.h" 27 #include "chrome/views/grid_layout.h"
29 #include "chrome/views/native_button.h" 28 #include "chrome/views/native_button.h"
30 #include "chrome/views/radio_button.h" 29 #include "chrome/views/radio_button.h"
31 #include "chrome/views/text_field.h" 30 #include "chrome/views/text_field.h"
32 #include "chrome/views/widget.h" 31 #include "chrome/views/widget.h"
33 #include "generated_resources.h" 32 #include "generated_resources.h"
33 #include "skia/ext/skia_utils_win.h"
34 #include "skia/include/SkBitmap.h" 34 #include "skia/include/SkBitmap.h"
35 35
36 namespace { 36 namespace {
37 37
38 static const int kPopupBlockingRadioGroup = 1; 38 static const int kPopupBlockingRadioGroup = 1;
39 static const int kPasswordSavingRadioGroup = 2; 39 static const int kPasswordSavingRadioGroup = 2;
40 static const int kFileIconSize = 16; 40 static const int kFileIconSize = 16;
41 static const int kFileIconVerticalSpacing = 3; 41 static const int kFileIconVerticalSpacing = 3;
42 static const int kFileIconHorizontalSpacing = 3; 42 static const int kFileIconHorizontalSpacing = 3;
43 static const int kFileIconTextFieldSpacing = 3; 43 static const int kFileIconTextFieldSpacing = 3;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 void FileDisplayArea::SetFile(const std::wstring& file_path) { 96 void FileDisplayArea::SetFile(const std::wstring& file_path) {
97 text_field_->SetText(file_path); 97 text_field_->SetText(file_path);
98 } 98 }
99 99
100 void FileDisplayArea::Paint(ChromeCanvas* canvas) { 100 void FileDisplayArea::Paint(ChromeCanvas* canvas) {
101 HDC dc = canvas->beginPlatformPaint(); 101 HDC dc = canvas->beginPlatformPaint();
102 RECT rect = { 0, 0, width(), height() }; 102 RECT rect = { 0, 0, width(), height() };
103 gfx::NativeTheme::instance()->PaintTextField( 103 gfx::NativeTheme::instance()->PaintTextField(
104 dc, EP_EDITTEXT, ETS_READONLY, 0, &rect, 104 dc, EP_EDITTEXT, ETS_READONLY, 0, &rect,
105 gfx::SkColorToCOLORREF(text_field_background_color_), true, true); 105 skia::SkColorToCOLORREF(text_field_background_color_), true, true);
106 canvas->endPlatformPaint(); 106 canvas->endPlatformPaint();
107 canvas->DrawBitmapInt(default_folder_icon_, icon_bounds_.x(), 107 canvas->DrawBitmapInt(default_folder_icon_, icon_bounds_.x(),
108 icon_bounds_.y()); 108 icon_bounds_.y());
109 } 109 }
110 110
111 void FileDisplayArea::Layout() { 111 void FileDisplayArea::Layout() {
112 icon_bounds_.SetRect(kFileIconHorizontalSpacing, kFileIconVerticalSpacing, 112 icon_bounds_.SetRect(kFileIconHorizontalSpacing, kFileIconVerticalSpacing,
113 kFileIconSize, kFileIconSize); 113 kFileIconSize, kFileIconSize);
114 gfx::Size ps = text_field_->GetPreferredSize(); 114 gfx::Size ps = text_field_->GetPreferredSize();
115 text_field_->SetBounds(icon_bounds_.right() + kFileIconTextFieldSpacing, 115 text_field_->SetBounds(icon_bounds_.right() + kFileIconTextFieldSpacing,
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 contents, 480 contents,
481 l10n_util::GetString(IDS_OPTIONS_FONTSANDLANGUAGES_GROUP_NAME), 481 l10n_util::GetString(IDS_OPTIONS_FONTSANDLANGUAGES_GROUP_NAME),
482 L"", true); 482 L"", true);
483 } 483 }
484 484
485 void ContentPageView::UpdateDownloadDirectoryDisplay() { 485 void ContentPageView::UpdateDownloadDirectoryDisplay() {
486 download_default_download_location_display_->SetFile( 486 download_default_download_location_display_->SetFile(
487 default_download_location_.GetValue()); 487 default_download_location_.GetValue());
488 } 488 }
489 489
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_manager_view.cc ('k') | chrome/browser/views/options/fonts_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698