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

Unified Diff: chrome/views/non_client_view.cc

Issue 18804: OpaqueNonClientView cleanup (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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 | « chrome/views/non_client_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/non_client_view.cc
===================================================================
--- chrome/views/non_client_view.cc (revision 8638)
+++ chrome/views/non_client_view.cc (working copy)
@@ -7,42 +7,43 @@
namespace views {
int NonClientView::GetHTComponentForFrame(const gfx::Point& point,
- int resize_area_size,
- int resize_area_corner_size,
- int top_resize_area_size,
+ int top_resize_border_height,
+ int resize_border_width,
+ int bottom_resize_border_height,
+ int resize_corner_size,
bool can_resize) {
int component = HTNOWHERE;
- if (point.x() < resize_area_size) {
- if (point.y() < resize_area_corner_size) {
+ if (point.x() < resize_border_width) {
+ if (point.y() < resize_corner_size) {
component = HTTOPLEFT;
- } else if (point.y() >= (height() - resize_area_corner_size)) {
+ } else if (point.y() >= (height() - resize_corner_size)) {
component = HTBOTTOMLEFT;
} else {
component = HTLEFT;
}
- } else if (point.x() < resize_area_corner_size) {
- if (point.y() < top_resize_area_size) {
+ } else if (point.x() < resize_corner_size) {
+ if (point.y() < top_resize_border_height) {
component = HTTOPLEFT;
- } else if (point.y() >= (height() - resize_area_size)) {
+ } else if (point.y() >= (height() - bottom_resize_border_height)) {
component = HTBOTTOMLEFT;
}
- } else if (point.x() >= (width() - resize_area_size)) {
- if (point.y() < resize_area_corner_size) {
+ } else if (point.x() >= (width() - resize_border_width)) {
+ if (point.y() < resize_corner_size) {
component = HTTOPRIGHT;
- } else if (point.y() >= (height() - resize_area_corner_size)) {
+ } else if (point.y() >= (height() - resize_corner_size)) {
component = HTBOTTOMRIGHT;
- } else if (point.x() >= (width() - resize_area_size)) {
+ } else {
component = HTRIGHT;
}
- } else if (point.x() >= (width() - resize_area_corner_size)) {
- if (point.y() < top_resize_area_size) {
+ } else if (point.x() >= (width() - resize_corner_size)) {
+ if (point.y() < top_resize_border_height) {
component = HTTOPRIGHT;
- } else if (point.y() >= (height() - resize_area_size)) {
+ } else if (point.y() >= (height() - bottom_resize_border_height)) {
component = HTBOTTOMRIGHT;
}
- } else if (point.y() < top_resize_area_size) {
+ } else if (point.y() < top_resize_border_height) {
component = HTTOP;
- } else if (point.y() >= (height() - resize_area_size)) {
+ } else if (point.y() >= (height() - bottom_resize_border_height)) {
component = HTBOTTOM;
}
« no previous file with comments | « chrome/views/non_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698