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

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

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
« no previous file with comments | « ui/views/controls/textfield/textfield_model.cc ('k') | ui/views/view.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) 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 #ifndef UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #if defined(OS_WIN) 42 #if defined(OS_WIN)
43 #include "base/win/scoped_comptr.h" 43 #include "base/win/scoped_comptr.h"
44 #endif 44 #endif
45 45
46 using ui::OSExchangeData; 46 using ui::OSExchangeData;
47 47
48 namespace gfx { 48 namespace gfx {
49 class Canvas; 49 class Canvas;
50 class Insets; 50 class Insets;
51 class Path; 51 class Path;
52 class RenderText;
52 class Transform; 53 class Transform;
53 } 54 }
54 55
55 namespace ui { 56 namespace ui {
56 struct AXViewState; 57 struct AXViewState;
57 class Compositor; 58 class Compositor;
58 class InputMethod; 59 class InputMethod;
59 class Layer; 60 class Layer;
60 class NativeTheme; 61 class NativeTheme;
61 class PaintContext; 62 class PaintContext;
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // Returns the View that should be the target of an event having |rect| as 567 // Returns the View that should be the target of an event having |rect| as
567 // its location, or NULL if no such target exists. |rect| is in the local 568 // its location, or NULL if no such target exists. |rect| is in the local
568 // coordinate space of |this|. 569 // coordinate space of |this|.
569 View* GetEventHandlerForRect(const gfx::Rect& rect); 570 View* GetEventHandlerForRect(const gfx::Rect& rect);
570 571
571 // Returns the deepest visible descendant that contains the specified point 572 // Returns the deepest visible descendant that contains the specified point
572 // and supports tooltips. If the view does not contain the point, returns 573 // and supports tooltips. If the view does not contain the point, returns
573 // NULL. 574 // NULL.
574 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point); 575 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point);
575 576
577 // Returns the RenderText instance corresponding to the view. Currently, only
578 // views which have at most one RenderText instance, should implement this.
579 virtual const gfx::RenderText* GetRenderText() const;
sky 2016/09/26 16:20:18 Can you outline why this needs to be exposed on Vi
karandeepb 2016/09/27 01:09:11 So the problem we want to solve is given a views::
580 gfx::RenderText* GetRenderText();
581
576 // Return the cursor that should be used for this view or the default cursor. 582 // Return the cursor that should be used for this view or the default cursor.
577 // The event location is in the receiver's coordinate system. The caller is 583 // The event location is in the receiver's coordinate system. The caller is
578 // responsible for managing the lifetime of the returned object, though that 584 // responsible for managing the lifetime of the returned object, though that
579 // lifetime may vary from platform to platform. On Windows and Aura, 585 // lifetime may vary from platform to platform. On Windows and Aura,
580 // the cursor is a shared resource. 586 // the cursor is a shared resource.
581 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event); 587 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event);
582 588
583 // A convenience function which calls HitTestRect() with a rect of size 589 // A convenience function which calls HitTestRect() with a rect of size
584 // 1x1 and an origin of |point|. |point| is in the local coordinate space 590 // 1x1 and an origin of |point|. |point| is in the local coordinate space
585 // of |this|. 591 // of |this|.
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 // Belongs to this view, but it's reference-counted on some platforms 1570 // Belongs to this view, but it's reference-counted on some platforms
1565 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1571 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1566 NativeViewAccessibility* native_view_accessibility_; 1572 NativeViewAccessibility* native_view_accessibility_;
1567 1573
1568 DISALLOW_COPY_AND_ASSIGN(View); 1574 DISALLOW_COPY_AND_ASSIGN(View);
1569 }; 1575 };
1570 1576
1571 } // namespace views 1577 } // namespace views
1572 1578
1573 #endif // UI_VIEWS_VIEW_H_ 1579 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield_model.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698