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

Unified Diff: ui/base/native_theme/native_theme_win.cc

Issue 10310136: ui: Move NativeTheme files into ui/base/native_theme/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/native_theme/native_theme_win.h ('k') | ui/base/native_theme/native_theme_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/native_theme/native_theme_win.cc
diff --git a/ui/gfx/native_theme_win.cc b/ui/base/native_theme/native_theme_win.cc
similarity index 98%
rename from ui/gfx/native_theme_win.cc
rename to ui/base/native_theme/native_theme_win.cc
index 28574a282b6b84edd157ad8673a902bc4e0db946..abe605f951f1c498845c036260c6496c836fa981 100644
--- a/ui/gfx/native_theme_win.cc
+++ b/ui/base/native_theme/native_theme_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/gfx/native_theme_win.h"
+#include "ui/base/native_theme/native_theme_win.h"
#include <windows.h>
#include <uxtheme.h>
@@ -120,7 +120,7 @@ RECT InsetRect(const RECT* rect, int size) {
} // namespace
-namespace gfx {
+namespace ui {
bool NativeThemeWin::IsThemingActive() const {
if (is_theme_active_)
@@ -156,14 +156,14 @@ SkColor NativeThemeWin::GetThemeColorWithDefault(ThemeName theme,
return color;
}
-Size NativeThemeWin::GetThemeBorderSize(ThemeName theme) const {
+gfx::Size NativeThemeWin::GetThemeBorderSize(ThemeName theme) const {
// For simplicity use the wildcard state==0, part==0, since it works
// for the cases we currently depend on.
int border;
if (GetThemeInt(theme, 0, 0, TMT_BORDERSIZE, &border) == S_OK)
- return Size(border, border);
+ return gfx::Size(border, border);
else
- return Size(GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE));
+ return gfx::Size(GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE));
}
void NativeThemeWin::DisableTheming() const {
@@ -279,7 +279,7 @@ gfx::Size NativeThemeWin::GetPartSize(Part part,
}
}
- return Size(size.cx, size.cy);
+ return gfx::Size(size.cx, size.cy);
}
void NativeThemeWin::Paint(SkCanvas* canvas,
@@ -648,7 +648,7 @@ HRESULT NativeThemeWin::PaintMenuArrow(HDC hdc,
// it doesn't have a flag equivalent to DFCS_MENUARROWRIGHT. But they
// are needed for RTL locales on Vista. So use a memory DC and mirror
// the region with GDI's StretchBlt.
- Rect r(rect);
+ gfx::Rect r(rect);
base::win::ScopedCreateDC mem_dc(CreateCompatibleDC(hdc));
base::win::ScopedBitmap mem_bitmap(CreateCompatibleBitmap(hdc, r.width(),
r.height()));
@@ -984,16 +984,16 @@ HRESULT NativeThemeWin::PaintScrollbarThumb(
int state_id;
switch (part) {
- case gfx::NativeTheme::kScrollbarHorizontalThumb:
+ case NativeTheme::kScrollbarHorizontalThumb:
part_id = SBP_THUMBBTNHORZ;
break;
- case gfx::NativeTheme::kScrollbarVerticalThumb:
+ case NativeTheme::kScrollbarVerticalThumb:
part_id = SBP_THUMBBTNVERT;
break;
- case gfx::NativeTheme::kScrollbarHorizontalGripper:
+ case NativeTheme::kScrollbarHorizontalGripper:
part_id = SBP_GRIPPERHORZ;
break;
- case gfx::NativeTheme::kScrollbarVerticalGripper:
+ case NativeTheme::kScrollbarVerticalGripper:
part_id = SBP_GRIPPERVERT;
break;
default:
@@ -1042,10 +1042,10 @@ HRESULT NativeThemeWin::PaintScrollbarTrack(
int state_id;
switch (part) {
- case gfx::NativeTheme::kScrollbarHorizontalTrack:
+ case NativeTheme::kScrollbarHorizontalTrack:
part_id = extra.is_upper ? SBP_UPPERTRACKHORZ : SBP_LOWERTRACKHORZ;
break;
- case gfx::NativeTheme::kScrollbarVerticalTrack:
+ case NativeTheme::kScrollbarVerticalTrack:
part_id = extra.is_upper ? SBP_UPPERTRACKVERT : SBP_LOWERTRACKVERT;
break;
default:
@@ -1696,15 +1696,15 @@ HRESULT NativeThemeWin::PaintFrameControl(HDC hdc,
int bg_color_key;
int text_color_key;
switch (control_state) {
- case gfx::NativeTheme::kHovered:
+ case NativeTheme::kHovered:
bg_color_key = COLOR_HIGHLIGHT;
text_color_key = COLOR_HIGHLIGHTTEXT;
break;
- case gfx::NativeTheme::kNormal:
+ case NativeTheme::kNormal:
bg_color_key = COLOR_MENU;
text_color_key = COLOR_MENUTEXT;
break;
- case gfx::NativeTheme::kDisabled:
+ case NativeTheme::kDisabled:
bg_color_key = is_selected ? COLOR_HIGHLIGHT : COLOR_MENU;
text_color_key = COLOR_GRAYTEXT;
break;
@@ -1776,4 +1776,4 @@ HANDLE NativeThemeWin::GetThemeHandle(ThemeName theme_name) const {
return handle;
}
-} // namespace gfx
+} // namespace ui
« no previous file with comments | « ui/base/native_theme/native_theme_win.h ('k') | ui/base/native_theme/native_theme_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698