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

Side by Side Diff: third_party/WebKit/Source/platform/FrameViewBase.h

Issue 2832883003: Remove unneeded Convert* methods and move many from FrameViewBase to FrameView (Closed)
Patch Set: fix ScrollableArea::ConvertFromScrollbarToContainingFrameViewBase and remove dchecks Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2008 Collabora Ltd. All rights reserved. 3 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 virtual bool IsPluginView() const { return false; } 82 virtual bool IsPluginView() const { return false; }
83 virtual bool IsPluginContainer() const { return false; } 83 virtual bool IsPluginContainer() const { return false; }
84 virtual bool IsScrollbar() const { return false; } 84 virtual bool IsScrollbar() const { return false; }
85 85
86 virtual void SetParent(FrameViewBase*); 86 virtual void SetParent(FrameViewBase*);
87 FrameViewBase* Parent() const { return parent_; } 87 FrameViewBase* Parent() const { return parent_; }
88 FrameViewBase* Root() const; 88 FrameViewBase* Root() const;
89 89
90 virtual void HandleEvent(Event*) {} 90 virtual void HandleEvent(Event*) {}
91 91
92 IntRect ConvertToRootFrame(const IntRect&) const; 92 // ConvertFromRootFrame must be in FrameViewBase rather than FrameView
93 // to be visible to Scrollbar::ConvertFromRootFrame and
94 // RemoteFrameView::UpdateRemoteViewportIntersection. The related
95 // ConvertFromContainingFrameViewBase must be declared locally to be visible.
93 IntRect ConvertFromRootFrame(const IntRect&) const; 96 IntRect ConvertFromRootFrame(const IntRect&) const;
94
95 IntPoint ConvertToRootFrame(const IntPoint&) const;
96 IntPoint ConvertFromRootFrame(const IntPoint&) const; 97 IntPoint ConvertFromRootFrame(const IntPoint&) const;
97 FloatPoint ConvertFromRootFrame(const FloatPoint&) const; 98 FloatPoint ConvertFromRootFrame(const FloatPoint&) const;
99 // TODO(joelhockey): Change all these to pure virtual functions
100 // Once RemoteFrameView no longer inherits from FrameViewBase.
101 virtual IntRect ConvertFromContainingFrameViewBase(
102 const IntRect& parent_rect) const {
103 NOTREACHED();
104 return parent_rect;
105 }
106 virtual IntPoint ConvertFromContainingFrameViewBase(
107 const IntPoint& parent_point) const {
108 NOTREACHED();
109 return parent_point;
110 }
98 111
99 virtual void FrameRectsChanged() {} 112 virtual void FrameRectsChanged() {}
100 113
101 virtual void GeometryMayHaveChanged() {} 114 virtual void GeometryMayHaveChanged() {}
102 115
103 virtual IntRect ConvertToContainingFrameViewBase(const IntRect&) const;
104 virtual IntRect ConvertFromContainingFrameViewBase(const IntRect&) const;
105 virtual IntPoint ConvertToContainingFrameViewBase(const IntPoint&) const;
106 virtual IntPoint ConvertFromContainingFrameViewBase(const IntPoint&) const;
107
108 // Virtual methods to convert points to/from child frameviewbases.
109 virtual IntPoint ConvertChildToSelf(const FrameViewBase*,
110 const IntPoint&) const;
111 virtual IntPoint ConvertSelfToChild(const FrameViewBase*,
112 const IntPoint&) const;
113
114 // Notifies this frameviewbase that it will no longer be receiving events. 116 // Notifies this frameviewbase that it will no longer be receiving events.
115 virtual void EventListenersRemoved() {} 117 virtual void EventListenersRemoved() {}
116 118
117 DECLARE_VIRTUAL_TRACE(); 119 DECLARE_VIRTUAL_TRACE();
118 virtual void Dispose() {} 120 virtual void Dispose() {}
119 121
120 private: 122 private:
121 Member<FrameViewBase> parent_; 123 Member<FrameViewBase> parent_;
122 IntRect frame_rect_; 124 IntRect frame_rect_;
123 bool self_visible_; 125 bool self_visible_;
124 bool parent_visible_; 126 bool parent_visible_;
125 }; 127 };
126 128
127 } // namespace blink 129 } // namespace blink
128 130
129 #endif // FrameViewBase_h 131 #endif // FrameViewBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698