OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/controls/resize_area.h" | 5 #include "views/controls/resize_area.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
9 | 9 |
10 #if defined(OS_LINUX) | 10 #if defined(OS_LINUX) |
11 #include "gfx/gtk_util.h" | 11 #include "ui/gfx/gtk_util.h" |
12 #endif | 12 #endif |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 | 15 |
16 const char ResizeArea::kViewClassName[] = "views/ResizeArea"; | 16 const char ResizeArea::kViewClassName[] = "views/ResizeArea"; |
17 | 17 |
18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
19 static HCURSOR g_resize_cursor = NULL; | 19 static HCURSOR g_resize_cursor = NULL; |
20 #endif | 20 #endif |
21 | 21 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 void ResizeArea::ReportResizeAmount(int resize_amount, bool last_update) { | 81 void ResizeArea::ReportResizeAmount(int resize_amount, bool last_update) { |
82 gfx::Point point(resize_amount, 0); | 82 gfx::Point point(resize_amount, 0); |
83 View::ConvertPointToScreen(this, &point); | 83 View::ConvertPointToScreen(this, &point); |
84 resize_amount = point.x() - initial_position_; | 84 resize_amount = point.x() - initial_position_; |
85 delegate_->OnResize(base::i18n::IsRTL() ? -resize_amount : resize_amount, | 85 delegate_->OnResize(base::i18n::IsRTL() ? -resize_amount : resize_amount, |
86 last_update); | 86 last_update); |
87 } | 87 } |
88 | 88 |
89 } // namespace views | 89 } // namespace views |
OLD | NEW |