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

Side by Side Diff: views/controls/textfield/native_textfield_views.cc

Issue 7850026: Aura under Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: White spaces Created 9 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 unified diff | Download patch | Annotate | Revision Log
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 "views/controls/textfield/native_textfield_views.h" 5 #include "views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 281 }
282 282
283 gfx::NativeCursor NativeTextfieldViews::GetCursor(const MouseEvent& event) { 283 gfx::NativeCursor NativeTextfieldViews::GetCursor(const MouseEvent& event) {
284 bool in_selection = GetRenderText()->IsPointInSelection(event.location()); 284 bool in_selection = GetRenderText()->IsPointInSelection(event.location());
285 bool drag_event = event.type() == ui::ET_MOUSE_DRAGGED; 285 bool drag_event = event.type() == ui::ET_MOUSE_DRAGGED;
286 bool text_cursor = !initiating_drag_ && (drag_event || !in_selection); 286 bool text_cursor = !initiating_drag_ && (drag_event || !in_selection);
287 #if defined(OS_WIN) 287 #if defined(OS_WIN)
288 static HCURSOR ibeam = LoadCursor(NULL, IDC_IBEAM); 288 static HCURSOR ibeam = LoadCursor(NULL, IDC_IBEAM);
289 static HCURSOR arrow = LoadCursor(NULL, IDC_ARROW); 289 static HCURSOR arrow = LoadCursor(NULL, IDC_ARROW);
290 return text_cursor ? ibeam : arrow; 290 return text_cursor ? ibeam : arrow;
291 #elif defined(USE_AURA)
292 // TODO(saintlou):
293 (void)text_cursor;
294 return NULL;
291 #else 295 #else
292 return text_cursor ? gfx::GetCursor(GDK_XTERM) : NULL; 296 return text_cursor ? gfx::GetCursor(GDK_XTERM) : NULL;
293 #endif 297 #endif
294 } 298 }
295 299
296 ///////////////////////////////////////////////////////////////// 300 /////////////////////////////////////////////////////////////////
297 // NativeTextfieldViews, ContextMenuController overrides: 301 // NativeTextfieldViews, ContextMenuController overrides:
298 void NativeTextfieldViews::ShowContextMenuForView(View* source, 302 void NativeTextfieldViews::ShowContextMenuForView(View* source,
299 const gfx::Point& p, 303 const gfx::Point& p,
300 bool is_mouse_gesture) { 304 bool is_mouse_gesture) {
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 1049
1046 #if defined(USE_AURA) 1050 #if defined(USE_AURA)
1047 // static 1051 // static
1048 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( 1052 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper(
1049 Textfield* field) { 1053 Textfield* field) {
1050 return new NativeTextfieldViews(field); 1054 return new NativeTextfieldViews(field);
1051 } 1055 }
1052 #endif 1056 #endif
1053 1057
1054 } // namespace views 1058 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698