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

Side by Side Diff: ui/views/view.cc

Issue 2348143003: MacViews: Implement Force Touch/Mac dictionary lookup for Textfields. (Closed)
Patch Set: Address review. Created 4 years, 2 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
« ui/views/view.h ('K') | « ui/views/view.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 914
915 gfx::Point point_in_child_coords(point); 915 gfx::Point point_in_child_coords(point);
916 ConvertPointToTarget(this, child, &point_in_child_coords); 916 ConvertPointToTarget(this, child, &point_in_child_coords);
917 View* handler = child->GetTooltipHandlerForPoint(point_in_child_coords); 917 View* handler = child->GetTooltipHandlerForPoint(point_in_child_coords);
918 if (handler) 918 if (handler)
919 return handler; 919 return handler;
920 } 920 }
921 return this; 921 return this;
922 } 922 }
923 923
924 const gfx::RenderText* View::GetRenderText() const {
925 return nullptr;
926 }
927
928 gfx::RenderText* View::GetRenderText() {
929 return const_cast<gfx::RenderText*>(
930 const_cast<const View*>(this)->GetRenderText());
931 }
932
924 gfx::NativeCursor View::GetCursor(const ui::MouseEvent& event) { 933 gfx::NativeCursor View::GetCursor(const ui::MouseEvent& event) {
925 #if defined(OS_WIN) 934 #if defined(OS_WIN)
926 static ui::Cursor arrow; 935 static ui::Cursor arrow;
927 if (!arrow.platform()) 936 if (!arrow.platform())
928 arrow.SetPlatformCursor(LoadCursor(NULL, IDC_ARROW)); 937 arrow.SetPlatformCursor(LoadCursor(NULL, IDC_ARROW));
929 return arrow; 938 return arrow;
930 #else 939 #else
931 return gfx::kNullCursor; 940 return gfx::kNullCursor;
932 #endif 941 #endif
933 } 942 }
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 // Message the RootView to do the drag and drop. That way if we're removed 2427 // Message the RootView to do the drag and drop. That way if we're removed
2419 // the RootView can detect it and avoid calling us back. 2428 // the RootView can detect it and avoid calling us back.
2420 gfx::Point widget_location(event.location()); 2429 gfx::Point widget_location(event.location());
2421 ConvertPointToWidget(this, &widget_location); 2430 ConvertPointToWidget(this, &widget_location);
2422 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2431 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2423 // WARNING: we may have been deleted. 2432 // WARNING: we may have been deleted.
2424 return true; 2433 return true;
2425 } 2434 }
2426 2435
2427 } // namespace views 2436 } // namespace views
OLDNEW
« ui/views/view.h ('K') | « ui/views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698