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

Side by Side Diff: ui/views/controls/resize_area.cc

Issue 8909002: views: Convert IsEnabled() to just enabled() since it's just a simple accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/progress_bar.cc ('k') | ui/views/controls/table/native_table_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/views/controls/resize_area.h" 5 #include "ui/views/controls/resize_area.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/accessibility/accessible_view_state.h" 8 #include "ui/base/accessibility/accessible_view_state.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/views/controls/resize_area_delegate.h" 10 #include "ui/views/controls/resize_area_delegate.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 ResizeArea::~ResizeArea() { 32 ResizeArea::~ResizeArea() {
33 } 33 }
34 34
35 std::string ResizeArea::GetClassName() const { 35 std::string ResizeArea::GetClassName() const {
36 return kViewClassName; 36 return kViewClassName;
37 } 37 }
38 38
39 gfx::NativeCursor ResizeArea::GetCursor(const MouseEvent& event) { 39 gfx::NativeCursor ResizeArea::GetCursor(const MouseEvent& event) {
40 if (!IsEnabled()) 40 if (!enabled())
41 return gfx::kNullCursor; 41 return gfx::kNullCursor;
42 #if defined(USE_AURA) 42 #if defined(USE_AURA)
43 return aura::kCursorEastWestResize; 43 return aura::kCursorEastWestResize;
44 #elif defined(OS_WIN) 44 #elif defined(OS_WIN)
45 static HCURSOR g_resize_cursor = LoadCursor(NULL, IDC_SIZEWE); 45 static HCURSOR g_resize_cursor = LoadCursor(NULL, IDC_SIZEWE);
46 return g_resize_cursor; 46 return g_resize_cursor;
47 #elif defined(OS_LINUX) 47 #elif defined(OS_LINUX)
48 return gfx::GetCursor(GDK_SB_H_DOUBLE_ARROW); 48 return gfx::GetCursor(GDK_SB_H_DOUBLE_ARROW);
49 #endif 49 #endif
50 } 50 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 void ResizeArea::ReportResizeAmount(int resize_amount, bool last_update) { 86 void ResizeArea::ReportResizeAmount(int resize_amount, bool last_update) {
87 gfx::Point point(resize_amount, 0); 87 gfx::Point point(resize_amount, 0);
88 View::ConvertPointToScreen(this, &point); 88 View::ConvertPointToScreen(this, &point);
89 resize_amount = point.x() - initial_position_; 89 resize_amount = point.x() - initial_position_;
90 delegate_->OnResize(base::i18n::IsRTL() ? -resize_amount : resize_amount, 90 delegate_->OnResize(base::i18n::IsRTL() ? -resize_amount : resize_amount,
91 last_update); 91 last_update);
92 } 92 }
93 93
94 } // namespace views 94 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/progress_bar.cc ('k') | ui/views/controls/table/native_table_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698