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

Unified Diff: ui/gfx/win/hwnd_util.cc

Issue 23769011: Move a bunch of windows stuff from ui/base/win to ui/gfx/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar bustage. Created 7 years, 3 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/gfx/win/hwnd_util.h ('k') | ui/gfx/win/scoped_set_map_mode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/win/hwnd_util.cc
diff --git a/ui/base/win/hwnd_util.cc b/ui/gfx/win/hwnd_util.cc
similarity index 94%
rename from ui/base/win/hwnd_util.cc
rename to ui/gfx/win/hwnd_util.cc
index 0a8dfb26cc9f6e79d49e68cc1c025fa3cfa648f1..91f0ddd182a0d506a7db4bffd0d246e49134d92e 100644
--- a/ui/base/win/hwnd_util.cc
+++ b/ui/gfx/win/hwnd_util.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/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "base/i18n/rtl.h"
#include "base/strings/string_util.h"
@@ -12,7 +12,7 @@
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
-namespace ui {
+namespace gfx {
namespace {
@@ -25,9 +25,9 @@ void AdjustWindowToFit(HWND hwnd, const RECT& bounds, bool fit_to_monitor) {
MONITORINFO mi;
mi.cbSize = sizeof(mi);
base::win::GetMonitorInfoWrapper(hmon, &mi);
- gfx::Rect window_rect(bounds);
- gfx::Rect monitor_rect(mi.rcWork);
- gfx::Rect new_window_rect = window_rect;
+ Rect window_rect(bounds);
+ Rect monitor_rect(mi.rcWork);
+ Rect new_window_rect = window_rect;
new_window_rect.AdjustToFit(monitor_rect);
if (new_window_rect != window_rect) {
// Window doesn't fit on monitor, move and possibly resize.
@@ -115,7 +115,7 @@ bool DoesWindowBelongToActiveWindow(HWND window) {
void CenterAndSizeWindow(HWND parent,
HWND window,
- const gfx::Size& pref) {
+ const Size& pref) {
DCHECK(window && pref.width() > 0 && pref.height() > 0);
// Calculate the ideal bounds.
@@ -177,13 +177,13 @@ void CheckWindowCreated(HWND hwnd) {
void ShowSystemMenu(HWND window) {
RECT rect;
GetWindowRect(window, &rect);
- gfx::Point point = gfx::Point(rect.left, rect.top);
+ Point point = Point(rect.left, rect.top);
static const int kSystemMenuOffset = 10;
point.Offset(kSystemMenuOffset, kSystemMenuOffset);
ShowSystemMenuAtPoint(window, point);
}
-void ShowSystemMenuAtPoint(HWND window, const gfx::Point& point) {
+void ShowSystemMenuAtPoint(HWND window, const Point& point) {
// In the Metro process, we never want to show the system menu.
if (base::win::IsMetroProcess())
return;
@@ -211,4 +211,4 @@ HWND GetWindowToParentTo(bool get_real_hwnd) {
return root_window();
}
-} // namespace ui
+} // namespace gfx
« no previous file with comments | « ui/gfx/win/hwnd_util.h ('k') | ui/gfx/win/scoped_set_map_mode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698