summaryrefslogtreecommitdiffstats
path: root/views/window
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-31 20:39:02 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-31 20:39:02 +0000
commitfd85ad650d68309b965dbc9f3d6823cf2754349c (patch)
tree28b98629e02b2e05ec74272146f249ca62a164da /views/window
parentce072a7181ea5d58133e33654133236f5d9f5551 (diff)
downloadchromium_src-fd85ad650d68309b965dbc9f3d6823cf2754349c.zip
chromium_src-fd85ad650d68309b965dbc9f3d6823cf2754349c.tar.gz
chromium_src-fd85ad650d68309b965dbc9f3d6823cf2754349c.tar.bz2
Move app/win_util to app/win and fix the namespace usage.
Split out the two classes: ScopedComInitializer and ScopedCOMem (which I renamed) to separate files. I removed the win_util_path file which had one function in it and moved the function to win_util. Somehow, this was getting picked up by the nacl64 build and the call in sandbox_policy was then not being defined. I just implemented the function in-plcae since it's just a simple wrapper around a Windows API call. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6013009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r--views/window/custom_frame_view.cc12
-rw-r--r--views/window/window_win.cc20
2 files changed, 17 insertions, 15 deletions
diff --git a/views/window/custom_frame_view.cc b/views/window/custom_frame_view.cc
index 97287e1..002bb37 100644
--- a/views/window/custom_frame_view.cc
+++ b/views/window/custom_frame_view.cc
@@ -6,9 +6,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#if defined(OS_WIN)
-#include "app/win_util.h"
-#endif
#include "gfx/canvas.h"
#include "gfx/font.h"
#include "gfx/path.h"
@@ -16,10 +13,15 @@
#include "grit/app_strings.h"
#include "views/window/client_view.h"
#include "views/window/window_shape.h"
+#include "views/window/window_delegate.h"
+
#if defined(OS_LINUX)
#include "views/window/hit_test.h"
#endif
-#include "views/window/window_delegate.h"
+
+#if defined(OS_WIN)
+#include "app/win/win_util.h"
+#endif
namespace views {
@@ -566,7 +568,7 @@ void CustomFrameView::InitClass() {
static bool initialized = false;
if (!initialized) {
#if defined(OS_WIN)
- title_font_ = new gfx::Font(win_util::GetWindowTitleFont());
+ title_font_ = new gfx::Font(app::win::GetWindowTitleFont());
#elif defined(OS_LINUX)
// TODO(ben): need to resolve what font this is.
title_font_ = new gfx::Font();
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 664e17f..c0f4523 100644
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -10,7 +10,7 @@
#include "app/keyboard_code_conversion_win.h"
#include "app/theme_provider.h"
#include "app/win/hwnd_util.h"
-#include "app/win_util.h"
+#include "app/win/win_util.h"
#include "base/i18n/rtl.h"
#include "base/win/windows_version.h"
#include "gfx/canvas_skia_paint.h"
@@ -88,7 +88,7 @@ void SetChildBounds(HWND child_window, HWND parent_window,
}
gfx::Rect actual_bounds = bounds;
- win_util::EnsureRectIsVisibleInRect(gfx::Rect(parent_rect), &actual_bounds,
+ app::win::EnsureRectIsVisibleInRect(gfx::Rect(parent_rect), &actual_bounds,
padding);
SetWindowPos(child_window, insert_after_window, actual_bounds.x(),
@@ -843,9 +843,9 @@ LRESULT WindowWin::OnNCCalcSize(BOOL mode, LPARAM l_param) {
return 0;
}
}
- if (win_util::EdgeHasTopmostAutoHideTaskbar(ABE_LEFT, monitor))
- client_rect->left += win_util::kAutoHideTaskbarThicknessPx;
- if (win_util::EdgeHasTopmostAutoHideTaskbar(ABE_TOP, monitor)) {
+ if (app::win::EdgeHasTopmostAutoHideTaskbar(ABE_LEFT, monitor))
+ client_rect->left += app::win::kAutoHideTaskbarThicknessPx;
+ if (app::win::EdgeHasTopmostAutoHideTaskbar(ABE_TOP, monitor)) {
if (GetNonClientView()->UseNativeFrame()) {
// Tricky bit. Due to a bug in DwmDefWindowProc()'s handling of
// WM_NCHITTEST, having any nonclient area atop the window causes the
@@ -858,13 +858,13 @@ LRESULT WindowWin::OnNCCalcSize(BOOL mode, LPARAM l_param) {
// be no better solution.
--client_rect->bottom;
} else {
- client_rect->top += win_util::kAutoHideTaskbarThicknessPx;
+ client_rect->top += app::win::kAutoHideTaskbarThicknessPx;
}
}
- if (win_util::EdgeHasTopmostAutoHideTaskbar(ABE_RIGHT, monitor))
- client_rect->right -= win_util::kAutoHideTaskbarThicknessPx;
- if (win_util::EdgeHasTopmostAutoHideTaskbar(ABE_BOTTOM, monitor))
- client_rect->bottom -= win_util::kAutoHideTaskbarThicknessPx;
+ if (app::win::EdgeHasTopmostAutoHideTaskbar(ABE_RIGHT, monitor))
+ client_rect->right -= app::win::kAutoHideTaskbarThicknessPx;
+ if (app::win::EdgeHasTopmostAutoHideTaskbar(ABE_BOTTOM, monitor))
+ client_rect->bottom -= app::win::kAutoHideTaskbarThicknessPx;
// We cannot return WVR_REDRAW when there is nonclient area, or Windows
// exhibits bugs where client pixels and child HWNDs are mispositioned by