OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/native_tabbed_pane_win.h" | 5 #include "views/controls/tabbed_pane/native_tabbed_pane_win.h" |
6 | 6 |
7 #include <vssym32.h> | 7 #include <vssym32.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 gfx::NativeThemeWin::TAB, TABP_BODY, 0, TMT_FILLCOLORHINT, | 34 gfx::NativeThemeWin::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(gfx::Canvas* canvas, View* view) const { | 40 virtual void Paint(gfx::Canvas* canvas, View* view) const { |
41 gfx::Rect r(0, 0, view->width(), view->height()); | 41 gfx::Rect r(0, 0, view->width(), view->height()); |
42 gfx::NativeTheme::ExtraParams extra; | 42 gfx::NativeTheme::ExtraParams extra; |
43 gfx::NativeTheme::instance()->Paint( | 43 gfx::NativeTheme::instance()->Paint( |
44 canvas->AsCanvasSkia(), gfx::NativeTheme::kTabPanelBackground, | 44 canvas->GetSkCanvas(), gfx::NativeTheme::kTabPanelBackground, |
45 gfx::NativeTheme::kNormal, r, extra); | 45 gfx::NativeTheme::kNormal, r, extra); |
46 } | 46 } |
47 | 47 |
48 private: | 48 private: |
49 DISALLOW_COPY_AND_ASSIGN(TabBackground); | 49 DISALLOW_COPY_AND_ASSIGN(TabBackground); |
50 }; | 50 }; |
51 | 51 |
52 // Custom layout manager that takes care of sizing and displaying the tab pages. | 52 // Custom layout manager that takes care of sizing and displaying the tab pages. |
53 class TabLayout : public LayoutManager { | 53 class TabLayout : public LayoutManager { |
54 public: | 54 public: |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 //////////////////////////////////////////////////////////////////////////////// | 398 //////////////////////////////////////////////////////////////////////////////// |
399 // NativeTabbedPaneWrapper, public: | 399 // NativeTabbedPaneWrapper, public: |
400 | 400 |
401 // static | 401 // static |
402 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( | 402 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( |
403 TabbedPane* tabbed_pane) { | 403 TabbedPane* tabbed_pane) { |
404 return new NativeTabbedPaneWin(tabbed_pane); | 404 return new NativeTabbedPaneWin(tabbed_pane); |
405 } | 405 } |
406 | 406 |
407 } // namespace views | 407 } // namespace views |
OLD | NEW |