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

Unified Diff: chrome/browser/dock_info_win.cc

Issue 195036: Use RECT instead of CRect to reduce dependencies on ATL. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | chrome/browser/window_sizer_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dock_info_win.cc
===================================================================
--- chrome/browser/dock_info_win.cc (revision 25700)
+++ chrome/browser/dock_info_win.cc (working copy)
@@ -4,10 +4,6 @@
#include "chrome/browser/dock_info.h"
-#include <atlbase.h>
-#include <atlapp.h>
-#include <atlmisc.h>
-
#include "base/basictypes.h"
#include "base/logging.h"
#include "chrome/browser/browser.h"
@@ -28,7 +24,7 @@
class BaseWindowFinder {
public:
// Creates a BaseWindowFinder with the specified set of HWNDs to ignore.
- BaseWindowFinder(const std::set<HWND>& ignore) : ignore_(ignore) {}
+ explicit BaseWindowFinder(const std::set<HWND>& ignore) : ignore_(ignore) {}
virtual ~BaseWindowFinder() {}
protected:
@@ -71,13 +67,13 @@
return true;
}
- if (!::IsWindowVisible(hwnd)) {
+ if (!IsWindowVisible(hwnd)) {
// The window isn't visible, keep iterating.
return false;
}
- CRect r;
- if (!::GetWindowRect(hwnd, &r) || !r.PtInRect(screen_loc_.ToPOINT())) {
+ RECT r;
+ if (!GetWindowRect(hwnd, &r) || !PtInRect(&r, screen_loc_.ToPOINT())) {
// The window doesn't contain the point, keep iterating.
return false;
}
@@ -145,9 +141,9 @@
protected:
virtual bool ShouldStopIterating(HWND hwnd) {
- CRect r;
- if (::IsWindowVisible(hwnd) && ::GetWindowRect(hwnd, &r) &&
- r.PtInRect(screen_loc_.ToPOINT())) {
+ RECT r;
+ if (IsWindowVisible(hwnd) && GetWindowRect(hwnd, &r) &&
+ PtInRect(&r, screen_loc_.ToPOINT())) {
result_ = hwnd;
return true;
}
@@ -196,9 +192,9 @@
protected:
virtual bool ShouldStopIterating(HWND hwnd) {
BrowserView* window = BrowserView::GetBrowserViewForNativeWindow(hwnd);
- CRect bounds;
- if (!window || !::IsWindowVisible(hwnd) ||
- !::GetWindowRect(hwnd, &bounds)) {
+ RECT bounds;
+ if (!window || !IsWindowVisible(hwnd) ||
+ !GetWindowRect(hwnd, &bounds)) {
return false;
}
@@ -310,6 +306,6 @@
// window we're docking to isn't maximized.
ShowWindow(window(), SW_RESTORE | SW_SHOWNA);
}
- ::SetWindowPos(window(), HWND_TOP, bounds.x(), bounds.y(), bounds.width(),
- bounds.height(), SWP_NOACTIVATE | SWP_NOOWNERZORDER);
+ SetWindowPos(window(), HWND_TOP, bounds.x(), bounds.y(), bounds.width(),
+ bounds.height(), SWP_NOACTIVATE | SWP_NOOWNERZORDER);
}
« no previous file with comments | « no previous file | chrome/browser/window_sizer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698