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

Side by Side Diff: views/controls/tabbed_pane.cc

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months 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
« no previous file with comments | « views/controls/single_split_view.cc ('k') | views/controls/table/group_table_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "views/controls/tabbed_pane.h" 5 #include "views/controls/tabbed_pane.h"
6 6
7 #include <vssym32.h> 7 #include <vssym32.h>
8 8
9 #include "app/gfx/chrome_canvas.h" 9 #include "app/gfx/canvas.h"
10 #include "app/gfx/chrome_font.h" 10 #include "app/gfx/font.h"
11 #include "app/l10n_util_win.h" 11 #include "app/l10n_util_win.h"
12 #include "app/resource_bundle.h" 12 #include "app/resource_bundle.h"
13 #include "base/gfx/native_theme.h" 13 #include "base/gfx/native_theme.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/stl_util-inl.h" 15 #include "base/stl_util-inl.h"
16 #include "skia/ext/skia_utils_win.h" 16 #include "skia/ext/skia_utils_win.h"
17 #include "third_party/skia/include/core/SkColor.h" 17 #include "third_party/skia/include/core/SkColor.h"
18 #include "views/background.h" 18 #include "views/background.h"
19 #include "views/fill_layout.h" 19 #include "views/fill_layout.h"
20 #include "views/widget/root_view.h" 20 #include "views/widget/root_view.h"
21 #include "views/widget/widget_win.h" 21 #include "views/widget/widget_win.h"
22 22
23 namespace views { 23 namespace views {
24 24
25 // A background object that paints the tab panel background which may be 25 // A background object that paints the tab panel background which may be
26 // rendered by the system visual styles system. 26 // rendered by the system visual styles system.
27 class TabBackground : public Background { 27 class TabBackground : public Background {
28 public: 28 public:
29 explicit TabBackground() { 29 explicit TabBackground() {
30 // TMT_FILLCOLORHINT returns a color value that supposedly 30 // TMT_FILLCOLORHINT returns a color value that supposedly
31 // approximates the texture drawn by PaintTabPanelBackground. 31 // approximates the texture drawn by PaintTabPanelBackground.
32 SkColor tab_page_color = 32 SkColor tab_page_color =
33 gfx::NativeTheme::instance()->GetThemeColorWithDefault( 33 gfx::NativeTheme::instance()->GetThemeColorWithDefault(
34 gfx::NativeTheme::TAB, TABP_BODY, 0, TMT_FILLCOLORHINT, 34 gfx::NativeTheme::TAB, TABP_BODY, 0, TMT_FILLCOLORHINT,
35 COLOR_3DFACE); 35 COLOR_3DFACE);
36 SetNativeControlColor(tab_page_color); 36 SetNativeControlColor(tab_page_color);
37 } 37 }
38 virtual ~TabBackground() {} 38 virtual ~TabBackground() {}
39 39
40 virtual void Paint(ChromeCanvas* canvas, View* view) const { 40 virtual void Paint(gfx::Canvas* canvas, View* view) const {
41 HDC dc = canvas->beginPlatformPaint(); 41 HDC dc = canvas->beginPlatformPaint();
42 RECT r = {0, 0, view->width(), view->height()}; 42 RECT r = {0, 0, view->width(), view->height()};
43 gfx::NativeTheme::instance()->PaintTabPanelBackground(dc, &r); 43 gfx::NativeTheme::instance()->PaintTabPanelBackground(dc, &r);
44 canvas->endPlatformPaint(); 44 canvas->endPlatformPaint();
45 } 45 }
46 46
47 private: 47 private:
48 DISALLOW_EVIL_CONSTRUCTORS(TabBackground); 48 DISALLOW_EVIL_CONSTRUCTORS(TabBackground);
49 }; 49 };
50 50
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 CRect content_bounds; 255 CRect content_bounds;
256 if (!GetClientRect(tab_control, &content_bounds)) 256 if (!GetClientRect(tab_control, &content_bounds))
257 return; 257 return;
258 TabCtrl_AdjustRect(tab_control, FALSE, &content_bounds); 258 TabCtrl_AdjustRect(tab_control, FALSE, &content_bounds);
259 content_window_->MoveWindow(content_bounds.left, content_bounds.top, 259 content_window_->MoveWindow(content_bounds.left, content_bounds.top,
260 content_bounds.Width(), content_bounds.Height(), 260 content_bounds.Width(), content_bounds.Height(),
261 TRUE); 261 TRUE);
262 } 262 }
263 263
264 } // namespace views 264 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/single_split_view.cc ('k') | views/controls/table/group_table_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698